github.com/0chain/gosdk@v1.17.11/znft/contracts/factory/binding/factory.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package binding
     5  
     6  import (
     7  	"errors"
     8  	"math/big"
     9  	"strings"
    10  
    11  	ethereum "github.com/ethereum/go-ethereum"
    12  	"github.com/ethereum/go-ethereum/accounts/abi"
    13  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    14  	"github.com/ethereum/go-ethereum/common"
    15  	"github.com/ethereum/go-ethereum/core/types"
    16  	"github.com/ethereum/go-ethereum/event"
    17  )
    18  
    19  // Reference imports to suppress errors if they are not otherwise used.
    20  var (
    21  	_ = errors.New
    22  	_ = big.NewInt
    23  	_ = strings.NewReader
    24  	_ = ethereum.NotFound
    25  	_ = bind.Bind
    26  	_ = common.Big1
    27  	_ = types.BloomLookup
    28  	_ = event.NewSubscription
    29  )
    30  
    31  // BindingMetaData contains all meta data concerning the Binding contract.
    32  var BindingMetaData = &bind.MetaData{
    33  	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"ModuleRegistered\",\"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\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenCreated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"create\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"moduleRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenList\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
    34  }
    35  
    36  // BindingABI is the input ABI used to generate the binding from.
    37  // Deprecated: Use BindingMetaData.ABI instead.
    38  var BindingABI = BindingMetaData.ABI
    39  
    40  // Binding is an auto generated Go binding around an Ethereum contract.
    41  type Binding struct {
    42  	BindingCaller     // Read-only binding to the contract
    43  	BindingTransactor // Write-only binding to the contract
    44  	BindingFilterer   // Log filterer for contract events
    45  }
    46  
    47  // BindingCaller is an auto generated read-only Go binding around an Ethereum contract.
    48  type BindingCaller struct {
    49  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    50  }
    51  
    52  // BindingTransactor is an auto generated write-only Go binding around an Ethereum contract.
    53  type BindingTransactor struct {
    54  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    55  }
    56  
    57  // BindingFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    58  type BindingFilterer struct {
    59  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    60  }
    61  
    62  // BindingSession is an auto generated Go binding around an Ethereum contract,
    63  // with pre-set call and transact options.
    64  type BindingSession struct {
    65  	Contract     *Binding          // Generic contract binding to set the session for
    66  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    67  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    68  }
    69  
    70  // BindingCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    71  // with pre-set call options.
    72  type BindingCallerSession struct {
    73  	Contract *BindingCaller // Generic contract caller binding to set the session for
    74  	CallOpts bind.CallOpts  // Call options to use throughout this session
    75  }
    76  
    77  // BindingTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    78  // with pre-set transact options.
    79  type BindingTransactorSession struct {
    80  	Contract     *BindingTransactor // Generic contract transactor binding to set the session for
    81  	TransactOpts bind.TransactOpts  // Transaction auth options to use throughout this session
    82  }
    83  
    84  // BindingRaw is an auto generated low-level Go binding around an Ethereum contract.
    85  type BindingRaw struct {
    86  	Contract *Binding // Generic contract binding to access the raw methods on
    87  }
    88  
    89  // BindingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    90  type BindingCallerRaw struct {
    91  	Contract *BindingCaller // Generic read-only contract binding to access the raw methods on
    92  }
    93  
    94  // BindingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    95  type BindingTransactorRaw struct {
    96  	Contract *BindingTransactor // Generic write-only contract binding to access the raw methods on
    97  }
    98  
    99  // NewBinding creates a new instance of Binding, bound to a specific deployed contract.
   100  func NewBinding(address common.Address, backend bind.ContractBackend) (*Binding, error) {
   101  	contract, err := bindBinding(address, backend, backend, backend)
   102  	if err != nil {
   103  		return nil, err
   104  	}
   105  	return &Binding{BindingCaller: BindingCaller{contract: contract}, BindingTransactor: BindingTransactor{contract: contract}, BindingFilterer: BindingFilterer{contract: contract}}, nil
   106  }
   107  
   108  // NewBindingCaller creates a new read-only instance of Binding, bound to a specific deployed contract.
   109  func NewBindingCaller(address common.Address, caller bind.ContractCaller) (*BindingCaller, error) {
   110  	contract, err := bindBinding(address, caller, nil, nil)
   111  	if err != nil {
   112  		return nil, err
   113  	}
   114  	return &BindingCaller{contract: contract}, nil
   115  }
   116  
   117  // NewBindingTransactor creates a new write-only instance of Binding, bound to a specific deployed contract.
   118  func NewBindingTransactor(address common.Address, transactor bind.ContractTransactor) (*BindingTransactor, error) {
   119  	contract, err := bindBinding(address, nil, transactor, nil)
   120  	if err != nil {
   121  		return nil, err
   122  	}
   123  	return &BindingTransactor{contract: contract}, nil
   124  }
   125  
   126  // NewBindingFilterer creates a new log filterer instance of Binding, bound to a specific deployed contract.
   127  func NewBindingFilterer(address common.Address, filterer bind.ContractFilterer) (*BindingFilterer, error) {
   128  	contract, err := bindBinding(address, nil, nil, filterer)
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	return &BindingFilterer{contract: contract}, nil
   133  }
   134  
   135  // bindBinding binds a generic wrapper to an already deployed contract.
   136  func bindBinding(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   137  	parsed, err := abi.JSON(strings.NewReader(BindingABI))
   138  	if err != nil {
   139  		return nil, err
   140  	}
   141  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   142  }
   143  
   144  // Call invokes the (constant) contract method with params as input values and
   145  // sets the output to result. The result type might be a single field for simple
   146  // returns, a slice of interfaces for anonymous returns and a struct for named
   147  // returns.
   148  func (_Binding *BindingRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   149  	return _Binding.Contract.BindingCaller.contract.Call(opts, result, method, params...)
   150  }
   151  
   152  // Transfer initiates a plain transaction to move funds to the contract, calling
   153  // its default method if one is available.
   154  func (_Binding *BindingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   155  	return _Binding.Contract.BindingTransactor.contract.Transfer(opts)
   156  }
   157  
   158  // Transact invokes the (paid) contract method with params as input values.
   159  func (_Binding *BindingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   160  	return _Binding.Contract.BindingTransactor.contract.Transact(opts, method, params...)
   161  }
   162  
   163  // Call invokes the (constant) contract method with params as input values and
   164  // sets the output to result. The result type might be a single field for simple
   165  // returns, a slice of interfaces for anonymous returns and a struct for named
   166  // returns.
   167  func (_Binding *BindingCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   168  	return _Binding.Contract.contract.Call(opts, result, method, params...)
   169  }
   170  
   171  // Transfer initiates a plain transaction to move funds to the contract, calling
   172  // its default method if one is available.
   173  func (_Binding *BindingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   174  	return _Binding.Contract.contract.Transfer(opts)
   175  }
   176  
   177  // Transact invokes the (paid) contract method with params as input values.
   178  func (_Binding *BindingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   179  	return _Binding.Contract.contract.Transact(opts, method, params...)
   180  }
   181  
   182  // Count is a free data retrieval call binding the contract method 0x06661abd.
   183  //
   184  // Solidity: function count() view returns(uint256)
   185  func (_Binding *BindingCaller) Count(opts *bind.CallOpts) (*big.Int, error) {
   186  	var out []interface{}
   187  	err := _Binding.contract.Call(opts, &out, "count")
   188  
   189  	if err != nil {
   190  		return *new(*big.Int), err
   191  	}
   192  
   193  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   194  
   195  	return out0, err
   196  
   197  }
   198  
   199  // Count is a free data retrieval call binding the contract method 0x06661abd.
   200  //
   201  // Solidity: function count() view returns(uint256)
   202  func (_Binding *BindingSession) Count() (*big.Int, error) {
   203  	return _Binding.Contract.Count(&_Binding.CallOpts)
   204  }
   205  
   206  // Count is a free data retrieval call binding the contract method 0x06661abd.
   207  //
   208  // Solidity: function count() view returns(uint256)
   209  func (_Binding *BindingCallerSession) Count() (*big.Int, error) {
   210  	return _Binding.Contract.Count(&_Binding.CallOpts)
   211  }
   212  
   213  // ModuleRegistry is a free data retrieval call binding the contract method 0x082a1051.
   214  //
   215  // Solidity: function moduleRegistry(address ) view returns(bool)
   216  func (_Binding *BindingCaller) ModuleRegistry(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
   217  	var out []interface{}
   218  	err := _Binding.contract.Call(opts, &out, "moduleRegistry", arg0)
   219  
   220  	if err != nil {
   221  		return *new(bool), err
   222  	}
   223  
   224  	out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
   225  
   226  	return out0, err
   227  
   228  }
   229  
   230  // ModuleRegistry is a free data retrieval call binding the contract method 0x082a1051.
   231  //
   232  // Solidity: function moduleRegistry(address ) view returns(bool)
   233  func (_Binding *BindingSession) ModuleRegistry(arg0 common.Address) (bool, error) {
   234  	return _Binding.Contract.ModuleRegistry(&_Binding.CallOpts, arg0)
   235  }
   236  
   237  // ModuleRegistry is a free data retrieval call binding the contract method 0x082a1051.
   238  //
   239  // Solidity: function moduleRegistry(address ) view returns(bool)
   240  func (_Binding *BindingCallerSession) ModuleRegistry(arg0 common.Address) (bool, error) {
   241  	return _Binding.Contract.ModuleRegistry(&_Binding.CallOpts, arg0)
   242  }
   243  
   244  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   245  //
   246  // Solidity: function owner() view returns(address)
   247  func (_Binding *BindingCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
   248  	var out []interface{}
   249  	err := _Binding.contract.Call(opts, &out, "owner")
   250  
   251  	if err != nil {
   252  		return *new(common.Address), err
   253  	}
   254  
   255  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   256  
   257  	return out0, err
   258  
   259  }
   260  
   261  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   262  //
   263  // Solidity: function owner() view returns(address)
   264  func (_Binding *BindingSession) Owner() (common.Address, error) {
   265  	return _Binding.Contract.Owner(&_Binding.CallOpts)
   266  }
   267  
   268  // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
   269  //
   270  // Solidity: function owner() view returns(address)
   271  func (_Binding *BindingCallerSession) Owner() (common.Address, error) {
   272  	return _Binding.Contract.Owner(&_Binding.CallOpts)
   273  }
   274  
   275  // TokenList is a free data retrieval call binding the contract method 0x9ead7222.
   276  //
   277  // Solidity: function tokenList(uint256 ) view returns(address)
   278  func (_Binding *BindingCaller) TokenList(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) {
   279  	var out []interface{}
   280  	err := _Binding.contract.Call(opts, &out, "tokenList", arg0)
   281  
   282  	if err != nil {
   283  		return *new(common.Address), err
   284  	}
   285  
   286  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   287  
   288  	return out0, err
   289  
   290  }
   291  
   292  // TokenList is a free data retrieval call binding the contract method 0x9ead7222.
   293  //
   294  // Solidity: function tokenList(uint256 ) view returns(address)
   295  func (_Binding *BindingSession) TokenList(arg0 *big.Int) (common.Address, error) {
   296  	return _Binding.Contract.TokenList(&_Binding.CallOpts, arg0)
   297  }
   298  
   299  // TokenList is a free data retrieval call binding the contract method 0x9ead7222.
   300  //
   301  // Solidity: function tokenList(uint256 ) view returns(address)
   302  func (_Binding *BindingCallerSession) TokenList(arg0 *big.Int) (common.Address, error) {
   303  	return _Binding.Contract.TokenList(&_Binding.CallOpts, arg0)
   304  }
   305  
   306  // TokenMapping is a free data retrieval call binding the contract method 0xba27f50b.
   307  //
   308  // Solidity: function tokenMapping(address ) view returns(bool)
   309  func (_Binding *BindingCaller) TokenMapping(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
   310  	var out []interface{}
   311  	err := _Binding.contract.Call(opts, &out, "tokenMapping", arg0)
   312  
   313  	if err != nil {
   314  		return *new(bool), err
   315  	}
   316  
   317  	out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
   318  
   319  	return out0, err
   320  
   321  }
   322  
   323  // TokenMapping is a free data retrieval call binding the contract method 0xba27f50b.
   324  //
   325  // Solidity: function tokenMapping(address ) view returns(bool)
   326  func (_Binding *BindingSession) TokenMapping(arg0 common.Address) (bool, error) {
   327  	return _Binding.Contract.TokenMapping(&_Binding.CallOpts, arg0)
   328  }
   329  
   330  // TokenMapping is a free data retrieval call binding the contract method 0xba27f50b.
   331  //
   332  // Solidity: function tokenMapping(address ) view returns(bool)
   333  func (_Binding *BindingCallerSession) TokenMapping(arg0 common.Address) (bool, error) {
   334  	return _Binding.Contract.TokenMapping(&_Binding.CallOpts, arg0)
   335  }
   336  
   337  // Create is a paid mutator transaction binding the contract method 0x9eeeaa75.
   338  //
   339  // Solidity: function create(address module, string name, string symbol, string uri, bytes data) returns(address)
   340  func (_Binding *BindingTransactor) Create(opts *bind.TransactOpts, module common.Address, name string, symbol string, uri string, data []byte) (*types.Transaction, error) {
   341  	return _Binding.contract.Transact(opts, "create", module, name, symbol, uri, data)
   342  }
   343  
   344  // Create is a paid mutator transaction binding the contract method 0x9eeeaa75.
   345  //
   346  // Solidity: function create(address module, string name, string symbol, string uri, bytes data) returns(address)
   347  func (_Binding *BindingSession) Create(module common.Address, name string, symbol string, uri string, data []byte) (*types.Transaction, error) {
   348  	return _Binding.Contract.Create(&_Binding.TransactOpts, module, name, symbol, uri, data)
   349  }
   350  
   351  // Create is a paid mutator transaction binding the contract method 0x9eeeaa75.
   352  //
   353  // Solidity: function create(address module, string name, string symbol, string uri, bytes data) returns(address)
   354  func (_Binding *BindingTransactorSession) Create(module common.Address, name string, symbol string, uri string, data []byte) (*types.Transaction, error) {
   355  	return _Binding.Contract.Create(&_Binding.TransactOpts, module, name, symbol, uri, data)
   356  }
   357  
   358  // Register is a paid mutator transaction binding the contract method 0xab01b469.
   359  //
   360  // Solidity: function register(address module, bool status) returns()
   361  func (_Binding *BindingTransactor) Register(opts *bind.TransactOpts, module common.Address, status bool) (*types.Transaction, error) {
   362  	return _Binding.contract.Transact(opts, "register", module, status)
   363  }
   364  
   365  // Register is a paid mutator transaction binding the contract method 0xab01b469.
   366  //
   367  // Solidity: function register(address module, bool status) returns()
   368  func (_Binding *BindingSession) Register(module common.Address, status bool) (*types.Transaction, error) {
   369  	return _Binding.Contract.Register(&_Binding.TransactOpts, module, status)
   370  }
   371  
   372  // Register is a paid mutator transaction binding the contract method 0xab01b469.
   373  //
   374  // Solidity: function register(address module, bool status) returns()
   375  func (_Binding *BindingTransactorSession) Register(module common.Address, status bool) (*types.Transaction, error) {
   376  	return _Binding.Contract.Register(&_Binding.TransactOpts, module, status)
   377  }
   378  
   379  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   380  //
   381  // Solidity: function renounceOwnership() returns()
   382  func (_Binding *BindingTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
   383  	return _Binding.contract.Transact(opts, "renounceOwnership")
   384  }
   385  
   386  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   387  //
   388  // Solidity: function renounceOwnership() returns()
   389  func (_Binding *BindingSession) RenounceOwnership() (*types.Transaction, error) {
   390  	return _Binding.Contract.RenounceOwnership(&_Binding.TransactOpts)
   391  }
   392  
   393  // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
   394  //
   395  // Solidity: function renounceOwnership() returns()
   396  func (_Binding *BindingTransactorSession) RenounceOwnership() (*types.Transaction, error) {
   397  	return _Binding.Contract.RenounceOwnership(&_Binding.TransactOpts)
   398  }
   399  
   400  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   401  //
   402  // Solidity: function transferOwnership(address newOwner) returns()
   403  func (_Binding *BindingTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
   404  	return _Binding.contract.Transact(opts, "transferOwnership", newOwner)
   405  }
   406  
   407  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   408  //
   409  // Solidity: function transferOwnership(address newOwner) returns()
   410  func (_Binding *BindingSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
   411  	return _Binding.Contract.TransferOwnership(&_Binding.TransactOpts, newOwner)
   412  }
   413  
   414  // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
   415  //
   416  // Solidity: function transferOwnership(address newOwner) returns()
   417  func (_Binding *BindingTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
   418  	return _Binding.Contract.TransferOwnership(&_Binding.TransactOpts, newOwner)
   419  }
   420  
   421  // BindingModuleRegisteredIterator is returned from FilterModuleRegistered and is used to iterate over the raw logs and unpacked data for ModuleRegistered events raised by the Binding contract.
   422  type BindingModuleRegisteredIterator struct {
   423  	Event *BindingModuleRegistered // Event containing the contract specifics and raw log
   424  
   425  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   426  	event    string              // Event name to use for unpacking event data
   427  
   428  	logs chan types.Log        // Log channel receiving the found contract events
   429  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   430  	done bool                  // Whether the subscription completed delivering logs
   431  	fail error                 // Occurred error to stop iteration
   432  }
   433  
   434  // Next advances the iterator to the subsequent event, returning whether there
   435  // are any more events found. In case of a retrieval or parsing error, false is
   436  // returned and Error() can be queried for the exact failure.
   437  func (it *BindingModuleRegisteredIterator) Next() bool {
   438  	// If the iterator failed, stop iterating
   439  	if it.fail != nil {
   440  		return false
   441  	}
   442  	// If the iterator completed, deliver directly whatever's available
   443  	if it.done {
   444  		select {
   445  		case log := <-it.logs:
   446  			it.Event = new(BindingModuleRegistered)
   447  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   448  				it.fail = err
   449  				return false
   450  			}
   451  			it.Event.Raw = log
   452  			return true
   453  
   454  		default:
   455  			return false
   456  		}
   457  	}
   458  	// Iterator still in progress, wait for either a data or an error event
   459  	select {
   460  	case log := <-it.logs:
   461  		it.Event = new(BindingModuleRegistered)
   462  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   463  			it.fail = err
   464  			return false
   465  		}
   466  		it.Event.Raw = log
   467  		return true
   468  
   469  	case err := <-it.sub.Err():
   470  		it.done = true
   471  		it.fail = err
   472  		return it.Next()
   473  	}
   474  }
   475  
   476  // Error returns any retrieval or parsing error occurred during filtering.
   477  func (it *BindingModuleRegisteredIterator) Error() error {
   478  	return it.fail
   479  }
   480  
   481  // Close terminates the iteration process, releasing any pending underlying
   482  // resources.
   483  func (it *BindingModuleRegisteredIterator) Close() error {
   484  	it.sub.Unsubscribe()
   485  	return nil
   486  }
   487  
   488  // BindingModuleRegistered represents a ModuleRegistered event raised by the Binding contract.
   489  type BindingModuleRegistered struct {
   490  	Module common.Address
   491  	Status bool
   492  	Raw    types.Log // Blockchain specific contextual infos
   493  }
   494  
   495  // FilterModuleRegistered is a free log retrieval operation binding the contract event 0x30091f391c7fccd6f943ec02ae164c4197ea3e43a67edc2edf908f3efc371876.
   496  //
   497  // Solidity: event ModuleRegistered(address indexed module, bool status)
   498  func (_Binding *BindingFilterer) FilterModuleRegistered(opts *bind.FilterOpts, module []common.Address) (*BindingModuleRegisteredIterator, error) {
   499  
   500  	var moduleRule []interface{}
   501  	for _, moduleItem := range module {
   502  		moduleRule = append(moduleRule, moduleItem)
   503  	}
   504  
   505  	logs, sub, err := _Binding.contract.FilterLogs(opts, "ModuleRegistered", moduleRule)
   506  	if err != nil {
   507  		return nil, err
   508  	}
   509  	return &BindingModuleRegisteredIterator{contract: _Binding.contract, event: "ModuleRegistered", logs: logs, sub: sub}, nil
   510  }
   511  
   512  // WatchModuleRegistered is a free log subscription operation binding the contract event 0x30091f391c7fccd6f943ec02ae164c4197ea3e43a67edc2edf908f3efc371876.
   513  //
   514  // Solidity: event ModuleRegistered(address indexed module, bool status)
   515  func (_Binding *BindingFilterer) WatchModuleRegistered(opts *bind.WatchOpts, sink chan<- *BindingModuleRegistered, module []common.Address) (event.Subscription, error) {
   516  
   517  	var moduleRule []interface{}
   518  	for _, moduleItem := range module {
   519  		moduleRule = append(moduleRule, moduleItem)
   520  	}
   521  
   522  	logs, sub, err := _Binding.contract.WatchLogs(opts, "ModuleRegistered", moduleRule)
   523  	if err != nil {
   524  		return nil, err
   525  	}
   526  	return event.NewSubscription(func(quit <-chan struct{}) error {
   527  		defer sub.Unsubscribe()
   528  		for {
   529  			select {
   530  			case log := <-logs:
   531  				// New log arrived, parse the event and forward to the user
   532  				event := new(BindingModuleRegistered)
   533  				if err := _Binding.contract.UnpackLog(event, "ModuleRegistered", log); err != nil {
   534  					return err
   535  				}
   536  				event.Raw = log
   537  
   538  				select {
   539  				case sink <- event:
   540  				case err := <-sub.Err():
   541  					return err
   542  				case <-quit:
   543  					return nil
   544  				}
   545  			case err := <-sub.Err():
   546  				return err
   547  			case <-quit:
   548  				return nil
   549  			}
   550  		}
   551  	}), nil
   552  }
   553  
   554  // ParseModuleRegistered is a log parse operation binding the contract event 0x30091f391c7fccd6f943ec02ae164c4197ea3e43a67edc2edf908f3efc371876.
   555  //
   556  // Solidity: event ModuleRegistered(address indexed module, bool status)
   557  func (_Binding *BindingFilterer) ParseModuleRegistered(log types.Log) (*BindingModuleRegistered, error) {
   558  	event := new(BindingModuleRegistered)
   559  	if err := _Binding.contract.UnpackLog(event, "ModuleRegistered", log); err != nil {
   560  		return nil, err
   561  	}
   562  	event.Raw = log
   563  	return event, nil
   564  }
   565  
   566  // BindingOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Binding contract.
   567  type BindingOwnershipTransferredIterator struct {
   568  	Event *BindingOwnershipTransferred // Event containing the contract specifics and raw log
   569  
   570  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   571  	event    string              // Event name to use for unpacking event data
   572  
   573  	logs chan types.Log        // Log channel receiving the found contract events
   574  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   575  	done bool                  // Whether the subscription completed delivering logs
   576  	fail error                 // Occurred error to stop iteration
   577  }
   578  
   579  // Next advances the iterator to the subsequent event, returning whether there
   580  // are any more events found. In case of a retrieval or parsing error, false is
   581  // returned and Error() can be queried for the exact failure.
   582  func (it *BindingOwnershipTransferredIterator) Next() bool {
   583  	// If the iterator failed, stop iterating
   584  	if it.fail != nil {
   585  		return false
   586  	}
   587  	// If the iterator completed, deliver directly whatever's available
   588  	if it.done {
   589  		select {
   590  		case log := <-it.logs:
   591  			it.Event = new(BindingOwnershipTransferred)
   592  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   593  				it.fail = err
   594  				return false
   595  			}
   596  			it.Event.Raw = log
   597  			return true
   598  
   599  		default:
   600  			return false
   601  		}
   602  	}
   603  	// Iterator still in progress, wait for either a data or an error event
   604  	select {
   605  	case log := <-it.logs:
   606  		it.Event = new(BindingOwnershipTransferred)
   607  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   608  			it.fail = err
   609  			return false
   610  		}
   611  		it.Event.Raw = log
   612  		return true
   613  
   614  	case err := <-it.sub.Err():
   615  		it.done = true
   616  		it.fail = err
   617  		return it.Next()
   618  	}
   619  }
   620  
   621  // Error returns any retrieval or parsing error occurred during filtering.
   622  func (it *BindingOwnershipTransferredIterator) Error() error {
   623  	return it.fail
   624  }
   625  
   626  // Close terminates the iteration process, releasing any pending underlying
   627  // resources.
   628  func (it *BindingOwnershipTransferredIterator) Close() error {
   629  	it.sub.Unsubscribe()
   630  	return nil
   631  }
   632  
   633  // BindingOwnershipTransferred represents a OwnershipTransferred event raised by the Binding contract.
   634  type BindingOwnershipTransferred struct {
   635  	PreviousOwner common.Address
   636  	NewOwner      common.Address
   637  	Raw           types.Log // Blockchain specific contextual infos
   638  }
   639  
   640  // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   641  //
   642  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   643  func (_Binding *BindingFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BindingOwnershipTransferredIterator, error) {
   644  
   645  	var previousOwnerRule []interface{}
   646  	for _, previousOwnerItem := range previousOwner {
   647  		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
   648  	}
   649  	var newOwnerRule []interface{}
   650  	for _, newOwnerItem := range newOwner {
   651  		newOwnerRule = append(newOwnerRule, newOwnerItem)
   652  	}
   653  
   654  	logs, sub, err := _Binding.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
   655  	if err != nil {
   656  		return nil, err
   657  	}
   658  	return &BindingOwnershipTransferredIterator{contract: _Binding.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
   659  }
   660  
   661  // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   662  //
   663  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   664  func (_Binding *BindingFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BindingOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
   665  
   666  	var previousOwnerRule []interface{}
   667  	for _, previousOwnerItem := range previousOwner {
   668  		previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
   669  	}
   670  	var newOwnerRule []interface{}
   671  	for _, newOwnerItem := range newOwner {
   672  		newOwnerRule = append(newOwnerRule, newOwnerItem)
   673  	}
   674  
   675  	logs, sub, err := _Binding.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
   676  	if err != nil {
   677  		return nil, err
   678  	}
   679  	return event.NewSubscription(func(quit <-chan struct{}) error {
   680  		defer sub.Unsubscribe()
   681  		for {
   682  			select {
   683  			case log := <-logs:
   684  				// New log arrived, parse the event and forward to the user
   685  				event := new(BindingOwnershipTransferred)
   686  				if err := _Binding.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
   687  					return err
   688  				}
   689  				event.Raw = log
   690  
   691  				select {
   692  				case sink <- event:
   693  				case err := <-sub.Err():
   694  					return err
   695  				case <-quit:
   696  					return nil
   697  				}
   698  			case err := <-sub.Err():
   699  				return err
   700  			case <-quit:
   701  				return nil
   702  			}
   703  		}
   704  	}), nil
   705  }
   706  
   707  // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
   708  //
   709  // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
   710  func (_Binding *BindingFilterer) ParseOwnershipTransferred(log types.Log) (*BindingOwnershipTransferred, error) {
   711  	event := new(BindingOwnershipTransferred)
   712  	if err := _Binding.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
   713  		return nil, err
   714  	}
   715  	event.Raw = log
   716  	return event, nil
   717  }
   718  
   719  // BindingTokenCreatedIterator is returned from FilterTokenCreated and is used to iterate over the raw logs and unpacked data for TokenCreated events raised by the Binding contract.
   720  type BindingTokenCreatedIterator struct {
   721  	Event *BindingTokenCreated // Event containing the contract specifics and raw log
   722  
   723  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   724  	event    string              // Event name to use for unpacking event data
   725  
   726  	logs chan types.Log        // Log channel receiving the found contract events
   727  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   728  	done bool                  // Whether the subscription completed delivering logs
   729  	fail error                 // Occurred error to stop iteration
   730  }
   731  
   732  // Next advances the iterator to the subsequent event, returning whether there
   733  // are any more events found. In case of a retrieval or parsing error, false is
   734  // returned and Error() can be queried for the exact failure.
   735  func (it *BindingTokenCreatedIterator) Next() bool {
   736  	// If the iterator failed, stop iterating
   737  	if it.fail != nil {
   738  		return false
   739  	}
   740  	// If the iterator completed, deliver directly whatever's available
   741  	if it.done {
   742  		select {
   743  		case log := <-it.logs:
   744  			it.Event = new(BindingTokenCreated)
   745  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   746  				it.fail = err
   747  				return false
   748  			}
   749  			it.Event.Raw = log
   750  			return true
   751  
   752  		default:
   753  			return false
   754  		}
   755  	}
   756  	// Iterator still in progress, wait for either a data or an error event
   757  	select {
   758  	case log := <-it.logs:
   759  		it.Event = new(BindingTokenCreated)
   760  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   761  			it.fail = err
   762  			return false
   763  		}
   764  		it.Event.Raw = log
   765  		return true
   766  
   767  	case err := <-it.sub.Err():
   768  		it.done = true
   769  		it.fail = err
   770  		return it.Next()
   771  	}
   772  }
   773  
   774  // Error returns any retrieval or parsing error occurred during filtering.
   775  func (it *BindingTokenCreatedIterator) Error() error {
   776  	return it.fail
   777  }
   778  
   779  // Close terminates the iteration process, releasing any pending underlying
   780  // resources.
   781  func (it *BindingTokenCreatedIterator) Close() error {
   782  	it.sub.Unsubscribe()
   783  	return nil
   784  }
   785  
   786  // BindingTokenCreated represents a TokenCreated event raised by the Binding contract.
   787  type BindingTokenCreated struct {
   788  	Owner common.Address
   789  	Token common.Address
   790  	Raw   types.Log // Blockchain specific contextual infos
   791  }
   792  
   793  // FilterTokenCreated is a free log retrieval operation binding the contract event 0xd5f9bdf12adf29dab0248c349842c3822d53ae2bb4f36352f301630d018c8139.
   794  //
   795  // Solidity: event TokenCreated(address indexed owner, address token)
   796  func (_Binding *BindingFilterer) FilterTokenCreated(opts *bind.FilterOpts, owner []common.Address) (*BindingTokenCreatedIterator, error) {
   797  
   798  	var ownerRule []interface{}
   799  	for _, ownerItem := range owner {
   800  		ownerRule = append(ownerRule, ownerItem)
   801  	}
   802  
   803  	logs, sub, err := _Binding.contract.FilterLogs(opts, "TokenCreated", ownerRule)
   804  	if err != nil {
   805  		return nil, err
   806  	}
   807  	return &BindingTokenCreatedIterator{contract: _Binding.contract, event: "TokenCreated", logs: logs, sub: sub}, nil
   808  }
   809  
   810  // WatchTokenCreated is a free log subscription operation binding the contract event 0xd5f9bdf12adf29dab0248c349842c3822d53ae2bb4f36352f301630d018c8139.
   811  //
   812  // Solidity: event TokenCreated(address indexed owner, address token)
   813  func (_Binding *BindingFilterer) WatchTokenCreated(opts *bind.WatchOpts, sink chan<- *BindingTokenCreated, owner []common.Address) (event.Subscription, error) {
   814  
   815  	var ownerRule []interface{}
   816  	for _, ownerItem := range owner {
   817  		ownerRule = append(ownerRule, ownerItem)
   818  	}
   819  
   820  	logs, sub, err := _Binding.contract.WatchLogs(opts, "TokenCreated", ownerRule)
   821  	if err != nil {
   822  		return nil, err
   823  	}
   824  	return event.NewSubscription(func(quit <-chan struct{}) error {
   825  		defer sub.Unsubscribe()
   826  		for {
   827  			select {
   828  			case log := <-logs:
   829  				// New log arrived, parse the event and forward to the user
   830  				event := new(BindingTokenCreated)
   831  				if err := _Binding.contract.UnpackLog(event, "TokenCreated", log); err != nil {
   832  					return err
   833  				}
   834  				event.Raw = log
   835  
   836  				select {
   837  				case sink <- event:
   838  				case err := <-sub.Err():
   839  					return err
   840  				case <-quit:
   841  					return nil
   842  				}
   843  			case err := <-sub.Err():
   844  				return err
   845  			case <-quit:
   846  				return nil
   847  			}
   848  		}
   849  	}), nil
   850  }
   851  
   852  // ParseTokenCreated is a log parse operation binding the contract event 0xd5f9bdf12adf29dab0248c349842c3822d53ae2bb4f36352f301630d018c8139.
   853  //
   854  // Solidity: event TokenCreated(address indexed owner, address token)
   855  func (_Binding *BindingFilterer) ParseTokenCreated(log types.Log) (*BindingTokenCreated, error) {
   856  	event := new(BindingTokenCreated)
   857  	if err := _Binding.contract.UnpackLog(event, "TokenCreated", log); err != nil {
   858  		return nil, err
   859  	}
   860  	event.Raw = log
   861  	return event, nil
   862  }