From a9d5e11e69aacb0fa85afcfb0e5c2311ca741cf4 Mon Sep 17 00:00:00 2001 From: Giuseppe Rodriguez <5714678+giuseppecrj@users.noreply.github.com> Date: Tue, 21 Feb 2023 13:47:18 -0800 Subject: [PATCH] Adds functionality on space factory to do an NFT check before creating a space (#1526) This PR does a couple of things: 1. Adds a flag on `spaceFactory` to check if the `createSpace` function is gated by a token address 2. Adds a flag on `spaceFactory` to pause the protocol when making changes like updating the implementations or enabling the token gating checks; if the protocol is paused, it will also prevent creating new spaces. --------- Co-authored-by: Tak Wai Wong <64229756+tak-hntlabs@users.noreply.github.com> --- .../goerli_space_factory/space-factory.json | 5 +- .../localhost_space_factory.go | 453 +++++++++++++++++- .../space-factory.json | 5 +- 3 files changed, 434 insertions(+), 29 deletions(-) diff --git a/zion/contracts/goerli_space_factory/space-factory.json b/zion/contracts/goerli_space_factory/space-factory.json index a99aac1f8..0701ba3c3 100644 --- a/zion/contracts/goerli_space_factory/space-factory.json +++ b/zion/contracts/goerli_space_factory/space-factory.json @@ -1,4 +1,5 @@ { "spaceFactory": "0x173b6a4Ec998A0e72656e0fc9Af2408B017C12f9", - "spaceToken": "0xD7efA82c6CEa706B396F4FfA23f0D01726F675cc" -} \ No newline at end of file + "spaceToken": "0xD7efA82c6CEa706B396F4FfA23f0D01726F675cc", + "pioneerToken": "" +} diff --git a/zion/contracts/localhost_space_factory/localhost_space_factory.go b/zion/contracts/localhost_space_factory/localhost_space_factory.go index 5824b11f3..bd1d29de3 100644 --- a/zion/contracts/localhost_space_factory/localhost_space_factory.go +++ b/zion/contracts/localhost_space_factory/localhost_space_factory.go @@ -46,7 +46,7 @@ type DataTypesExternalToken struct { // 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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\"}]", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidParameters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameContainsInvalidCharacters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NameLengthInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowed\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"GATE_TOKEN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"gatingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"address\",\"name\":\"_gateToken\",\"type\":\"address\"},{\"internalType\":\"string[]\",\"name\":\"_permissions\",\"type\":\"string[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"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\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"bool\",\"name\":\"_gatingEnabled\",\"type\":\"bool\"}],\"name\":\"setGatingEnabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_paused\",\"type\":\"bool\"}],\"name\":\"setPaused\",\"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\"},{\"internalType\":\"address\",\"name\":\"_gateToken\",\"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. @@ -195,6 +195,37 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorRaw) Transact(opts return _LocalhostSpaceFactory.Contract.contract.Transact(opts, method, params...) } +// GATETOKENADDRESS is a free data retrieval call binding the contract method 0xed267116. +// +// Solidity: function GATE_TOKEN_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) GATETOKENADDRESS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "GATE_TOKEN_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GATETOKENADDRESS is a free data retrieval call binding the contract method 0xed267116. +// +// Solidity: function GATE_TOKEN_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) GATETOKENADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.GATETOKENADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + +// GATETOKENADDRESS is a free data retrieval call binding the contract method 0xed267116. +// +// Solidity: function GATE_TOKEN_ADDRESS() view returns(address) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) GATETOKENADDRESS() (common.Address, error) { + return _LocalhostSpaceFactory.Contract.GATETOKENADDRESS(&_LocalhostSpaceFactory.CallOpts) +} + // SPACEIMPLEMENTATIONADDRESS is a free data retrieval call binding the contract method 0xf21cd401. // // Solidity: function SPACE_IMPLEMENTATION_ADDRESS() view returns(address) @@ -319,6 +350,37 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) USERIMPLEMENTA return _LocalhostSpaceFactory.Contract.USERIMPLEMENTATIONADDRESS(&_LocalhostSpaceFactory.CallOpts) } +// GatingEnabled is a free data retrieval call binding the contract method 0xc45f396b. +// +// Solidity: function gatingEnabled() view returns(bool) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) GatingEnabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "gatingEnabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// GatingEnabled is a free data retrieval call binding the contract method 0xc45f396b. +// +// Solidity: function gatingEnabled() view returns(bool) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) GatingEnabled() (bool, error) { + return _LocalhostSpaceFactory.Contract.GatingEnabled(&_LocalhostSpaceFactory.CallOpts) +} + +// GatingEnabled is a free data retrieval call binding the contract method 0xc45f396b. +// +// Solidity: function gatingEnabled() view returns(bool) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) GatingEnabled() (bool, error) { + return _LocalhostSpaceFactory.Contract.GatingEnabled(&_LocalhostSpaceFactory.CallOpts) +} + // GetOwnerPermissions is a free data retrieval call binding the contract method 0xdf2cd9fe. // // Solidity: function getOwnerPermissions() view returns(string[]) @@ -474,6 +536,37 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) OwnerPermissio return _LocalhostSpaceFactory.Contract.OwnerPermissions(&_LocalhostSpaceFactory.CallOpts, arg0) } +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _LocalhostSpaceFactory.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) Paused() (bool, error) { + return _LocalhostSpaceFactory.Contract.Paused(&_LocalhostSpaceFactory.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryCallerSession) Paused() (bool, error) { + return _LocalhostSpaceFactory.Contract.Paused(&_LocalhostSpaceFactory.CallOpts) +} + // ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. // // Solidity: function proxiableUUID() view returns(bytes32) @@ -609,25 +702,25 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) CreateSpac return _LocalhostSpaceFactory.Contract.CreateSpace(&_LocalhostSpaceFactory.TransactOpts, spaceName, spaceNetworkId, spaceMetadata, _everyonePermissions, _extraEntitlements) } -// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// Initialize is a paid mutator transaction binding the contract method 0x6e9ea7ca. // -// 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) +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, address _gateToken, string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) Initialize(opts *bind.TransactOpts, _space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _gateToken common.Address, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "initialize", _space, _tokenEntitlement, _userEntitlement, _spaceToken, _gateToken, _permissions) } -// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// Initialize is a paid mutator transaction binding the contract method 0x6e9ea7ca. // -// 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) +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, address _gateToken, string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) Initialize(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _gateToken common.Address, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.Initialize(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _spaceToken, _gateToken, _permissions) } -// Initialize is a paid mutator transaction binding the contract method 0x45bfa5b1. +// Initialize is a paid mutator transaction binding the contract method 0x6e9ea7ca. // -// 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) +// Solidity: function initialize(address _space, address _tokenEntitlement, address _userEntitlement, address _spaceToken, address _gateToken, string[] _permissions) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) Initialize(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _spaceToken common.Address, _gateToken common.Address, _permissions []string) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.Initialize(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _spaceToken, _gateToken, _permissions) } // OnERC721Received is a paid mutator transaction binding the contract method 0x150b7a02. @@ -672,6 +765,48 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) RenounceOw return _LocalhostSpaceFactory.Contract.RenounceOwnership(&_LocalhostSpaceFactory.TransactOpts) } +// SetGatingEnabled is a paid mutator transaction binding the contract method 0x4689cd04. +// +// Solidity: function setGatingEnabled(bool _gatingEnabled) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) SetGatingEnabled(opts *bind.TransactOpts, _gatingEnabled bool) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "setGatingEnabled", _gatingEnabled) +} + +// SetGatingEnabled is a paid mutator transaction binding the contract method 0x4689cd04. +// +// Solidity: function setGatingEnabled(bool _gatingEnabled) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) SetGatingEnabled(_gatingEnabled bool) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.SetGatingEnabled(&_LocalhostSpaceFactory.TransactOpts, _gatingEnabled) +} + +// SetGatingEnabled is a paid mutator transaction binding the contract method 0x4689cd04. +// +// Solidity: function setGatingEnabled(bool _gatingEnabled) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) SetGatingEnabled(_gatingEnabled bool) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.SetGatingEnabled(&_LocalhostSpaceFactory.TransactOpts, _gatingEnabled) +} + +// SetPaused is a paid mutator transaction binding the contract method 0x16c38b3c. +// +// Solidity: function setPaused(bool _paused) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) SetPaused(opts *bind.TransactOpts, _paused bool) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "setPaused", _paused) +} + +// SetPaused is a paid mutator transaction binding the contract method 0x16c38b3c. +// +// Solidity: function setPaused(bool _paused) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) SetPaused(_paused bool) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.SetPaused(&_LocalhostSpaceFactory.TransactOpts, _paused) +} + +// SetPaused is a paid mutator transaction binding the contract method 0x16c38b3c. +// +// Solidity: function setPaused(bool _paused) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) SetPaused(_paused bool) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.SetPaused(&_LocalhostSpaceFactory.TransactOpts, _paused) +} + // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -693,25 +828,25 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) TransferOw return _LocalhostSpaceFactory.Contract.TransferOwnership(&_LocalhostSpaceFactory.TransactOpts, newOwner) } -// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// UpdateImplementations is a paid mutator transaction binding the contract method 0x9ad622b7. // -// 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) +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement, address _gateToken) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactor) UpdateImplementations(opts *bind.TransactOpts, _space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _gateToken common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.contract.Transact(opts, "updateImplementations", _space, _tokenEntitlement, _userEntitlement, _gateToken) } -// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// UpdateImplementations is a paid mutator transaction binding the contract method 0x9ad622b7. // -// 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) +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement, address _gateToken) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactorySession) UpdateImplementations(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _gateToken common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpdateImplementations(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _gateToken) } -// UpdateImplementations is a paid mutator transaction binding the contract method 0xdfc666ff. +// UpdateImplementations is a paid mutator transaction binding the contract method 0x9ad622b7. // -// 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) +// Solidity: function updateImplementations(address _space, address _tokenEntitlement, address _userEntitlement, address _gateToken) returns() +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryTransactorSession) UpdateImplementations(_space common.Address, _tokenEntitlement common.Address, _userEntitlement common.Address, _gateToken common.Address) (*types.Transaction, error) { + return _LocalhostSpaceFactory.Contract.UpdateImplementations(&_LocalhostSpaceFactory.TransactOpts, _space, _tokenEntitlement, _userEntitlement, _gateToken) } // UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. @@ -1322,6 +1457,274 @@ func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseOwnershipTrans return event, nil } +// LocalhostSpaceFactoryPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryPausedIterator struct { + Event *LocalhostSpaceFactoryPaused // 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 *LocalhostSpaceFactoryPausedIterator) 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(LocalhostSpaceFactoryPaused) + 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(LocalhostSpaceFactoryPaused) + 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 *LocalhostSpaceFactoryPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryPaused represents a Paused event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterPaused(opts *bind.FilterOpts) (*LocalhostSpaceFactoryPausedIterator, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryPausedIterator{contract: _LocalhostSpaceFactory.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryPaused) (event.Subscription, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "Paused") + 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(LocalhostSpaceFactoryPaused) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Paused", 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 +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParsePaused(log types.Log) (*LocalhostSpaceFactoryPaused, error) { + event := new(LocalhostSpaceFactoryPaused) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// LocalhostSpaceFactoryUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryUnpausedIterator struct { + Event *LocalhostSpaceFactoryUnpaused // 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 *LocalhostSpaceFactoryUnpausedIterator) 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(LocalhostSpaceFactoryUnpaused) + 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(LocalhostSpaceFactoryUnpaused) + 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 *LocalhostSpaceFactoryUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *LocalhostSpaceFactoryUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// LocalhostSpaceFactoryUnpaused represents a Unpaused event raised by the LocalhostSpaceFactory contract. +type LocalhostSpaceFactoryUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) FilterUnpaused(opts *bind.FilterOpts) (*LocalhostSpaceFactoryUnpausedIterator, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &LocalhostSpaceFactoryUnpausedIterator{contract: _LocalhostSpaceFactory.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *LocalhostSpaceFactoryUnpaused) (event.Subscription, error) { + + logs, sub, err := _LocalhostSpaceFactory.contract.WatchLogs(opts, "Unpaused") + 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(LocalhostSpaceFactoryUnpaused) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Unpaused", 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 +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_LocalhostSpaceFactory *LocalhostSpaceFactoryFilterer) ParseUnpaused(log types.Log) (*LocalhostSpaceFactoryUnpaused, error) { + event := new(LocalhostSpaceFactoryUnpaused) + if err := _LocalhostSpaceFactory.contract.UnpackLog(event, "Unpaused", 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 diff --git a/zion/contracts/localhost_space_factory/space-factory.json b/zion/contracts/localhost_space_factory/space-factory.json index e9bd4c664..9d6dccb20 100644 --- a/zion/contracts/localhost_space_factory/space-factory.json +++ b/zion/contracts/localhost_space_factory/space-factory.json @@ -1,4 +1,5 @@ { "spaceFactory": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0", - "spaceToken": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853" -} \ No newline at end of file + "spaceToken": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "pioneerToken": "" +}