Collect.go 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548
  1. // Code generated - DO NOT EDIT.
  2. // This file is a generated binding and any manual changes will be lost.
  3. package Collect
  4. import (
  5. "errors"
  6. "math/big"
  7. "strings"
  8. ethereum "github.com/ethereum/go-ethereum"
  9. "github.com/ethereum/go-ethereum/accounts/abi"
  10. "github.com/ethereum/go-ethereum/accounts/abi/bind"
  11. "github.com/ethereum/go-ethereum/common"
  12. "github.com/ethereum/go-ethereum/core/types"
  13. "github.com/ethereum/go-ethereum/event"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var (
  17. _ = errors.New
  18. _ = big.NewInt
  19. _ = strings.NewReader
  20. _ = ethereum.NotFound
  21. _ = bind.Bind
  22. _ = common.Big1
  23. _ = types.BloomLookup
  24. _ = event.NewSubscription
  25. )
  26. // CollectMetaData contains all meta data concerning the Collect contract.
  27. var CollectMetaData = &bind.MetaData{
  28. ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"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\":\"participant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"inviter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Participate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_manager\",\"type\":\"address\"}],\"name\":\"RemoveManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_manager\",\"type\":\"address\"}],\"name\":\"SetManager\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_baseDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_baseReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_baseValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_community\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_devAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_reinputLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_reinputModBase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_technical\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimValue\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signTime\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"signature\",\"type\":\"bytes32\"}],\"name\":\"claimRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDigit\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"community\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"technical\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"devAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"managers\",\"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\":\"inviter\",\"type\":\"address\"}],\"name\":\"participate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_manager\",\"type\":\"address\"}],\"name\":\"removeManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"dis\",\"type\":\"uint256\"}],\"name\":\"setBaseDistribution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseReward\",\"type\":\"uint256\"}],\"name\":\"setBaseReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setBaseValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_digit\",\"type\":\"string\"}],\"name\":\"setDigit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_manager\",\"type\":\"address\"}],\"name\":\"setManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signTime\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"signature\",\"type\":\"bytes32\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_time\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_sign\",\"type\":\"bytes32\"}],\"name\":\"verifySignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
  29. }
  30. // CollectABI is the input ABI used to generate the binding from.
  31. // Deprecated: Use CollectMetaData.ABI instead.
  32. var CollectABI = CollectMetaData.ABI
  33. // Collect is an auto generated Go binding around an Ethereum contract.
  34. type Collect struct {
  35. CollectCaller // Read-only binding to the contract
  36. CollectTransactor // Write-only binding to the contract
  37. CollectFilterer // Log filterer for contract events
  38. }
  39. // CollectCaller is an auto generated read-only Go binding around an Ethereum contract.
  40. type CollectCaller struct {
  41. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  42. }
  43. // CollectTransactor is an auto generated write-only Go binding around an Ethereum contract.
  44. type CollectTransactor struct {
  45. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  46. }
  47. // CollectFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
  48. type CollectFilterer struct {
  49. contract *bind.BoundContract // Generic contract wrapper for the low level calls
  50. }
  51. // CollectSession is an auto generated Go binding around an Ethereum contract,
  52. // with pre-set call and transact options.
  53. type CollectSession struct {
  54. Contract *Collect // Generic contract binding to set the session for
  55. CallOpts bind.CallOpts // Call options to use throughout this session
  56. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  57. }
  58. // CollectCallerSession is an auto generated read-only Go binding around an Ethereum contract,
  59. // with pre-set call options.
  60. type CollectCallerSession struct {
  61. Contract *CollectCaller // Generic contract caller binding to set the session for
  62. CallOpts bind.CallOpts // Call options to use throughout this session
  63. }
  64. // CollectTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
  65. // with pre-set transact options.
  66. type CollectTransactorSession struct {
  67. Contract *CollectTransactor // Generic contract transactor binding to set the session for
  68. TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
  69. }
  70. // CollectRaw is an auto generated low-level Go binding around an Ethereum contract.
  71. type CollectRaw struct {
  72. Contract *Collect // Generic contract binding to access the raw methods on
  73. }
  74. // CollectCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
  75. type CollectCallerRaw struct {
  76. Contract *CollectCaller // Generic read-only contract binding to access the raw methods on
  77. }
  78. // CollectTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
  79. type CollectTransactorRaw struct {
  80. Contract *CollectTransactor // Generic write-only contract binding to access the raw methods on
  81. }
  82. // NewCollect creates a new instance of Collect, bound to a specific deployed contract.
  83. func NewCollect(address common.Address, backend bind.ContractBackend) (*Collect, error) {
  84. contract, err := bindCollect(address, backend, backend, backend)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return &Collect{CollectCaller: CollectCaller{contract: contract}, CollectTransactor: CollectTransactor{contract: contract}, CollectFilterer: CollectFilterer{contract: contract}}, nil
  89. }
  90. // NewCollectCaller creates a new read-only instance of Collect, bound to a specific deployed contract.
  91. func NewCollectCaller(address common.Address, caller bind.ContractCaller) (*CollectCaller, error) {
  92. contract, err := bindCollect(address, caller, nil, nil)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return &CollectCaller{contract: contract}, nil
  97. }
  98. // NewCollectTransactor creates a new write-only instance of Collect, bound to a specific deployed contract.
  99. func NewCollectTransactor(address common.Address, transactor bind.ContractTransactor) (*CollectTransactor, error) {
  100. contract, err := bindCollect(address, nil, transactor, nil)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return &CollectTransactor{contract: contract}, nil
  105. }
  106. // NewCollectFilterer creates a new log filterer instance of Collect, bound to a specific deployed contract.
  107. func NewCollectFilterer(address common.Address, filterer bind.ContractFilterer) (*CollectFilterer, error) {
  108. contract, err := bindCollect(address, nil, nil, filterer)
  109. if err != nil {
  110. return nil, err
  111. }
  112. return &CollectFilterer{contract: contract}, nil
  113. }
  114. // bindCollect binds a generic wrapper to an already deployed contract.
  115. func bindCollect(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
  116. parsed, err := abi.JSON(strings.NewReader(CollectABI))
  117. if err != nil {
  118. return nil, err
  119. }
  120. return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
  121. }
  122. // Call invokes the (constant) contract method with params as input values and
  123. // sets the output to result. The result type might be a single field for simple
  124. // returns, a slice of interfaces for anonymous returns and a struct for named
  125. // returns.
  126. func (_Collect *CollectRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  127. return _Collect.Contract.CollectCaller.contract.Call(opts, result, method, params...)
  128. }
  129. // Transfer initiates a plain transaction to move funds to the contract, calling
  130. // its default method if one is available.
  131. func (_Collect *CollectRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  132. return _Collect.Contract.CollectTransactor.contract.Transfer(opts)
  133. }
  134. // Transact invokes the (paid) contract method with params as input values.
  135. func (_Collect *CollectRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  136. return _Collect.Contract.CollectTransactor.contract.Transact(opts, method, params...)
  137. }
  138. // Call invokes the (constant) contract method with params as input values and
  139. // sets the output to result. The result type might be a single field for simple
  140. // returns, a slice of interfaces for anonymous returns and a struct for named
  141. // returns.
  142. func (_Collect *CollectCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
  143. return _Collect.Contract.contract.Call(opts, result, method, params...)
  144. }
  145. // Transfer initiates a plain transaction to move funds to the contract, calling
  146. // its default method if one is available.
  147. func (_Collect *CollectTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
  148. return _Collect.Contract.contract.Transfer(opts)
  149. }
  150. // Transact invokes the (paid) contract method with params as input values.
  151. func (_Collect *CollectTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
  152. return _Collect.Contract.contract.Transact(opts, method, params...)
  153. }
  154. // BaseDistribution is a free data retrieval call binding the contract method 0x6a97e1a6.
  155. //
  156. // Solidity: function _baseDistribution() view returns(uint256)
  157. func (_Collect *CollectCaller) BaseDistribution(opts *bind.CallOpts) (*big.Int, error) {
  158. var out []interface{}
  159. err := _Collect.contract.Call(opts, &out, "_baseDistribution")
  160. if err != nil {
  161. return *new(*big.Int), err
  162. }
  163. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  164. return out0, err
  165. }
  166. // BaseDistribution is a free data retrieval call binding the contract method 0x6a97e1a6.
  167. //
  168. // Solidity: function _baseDistribution() view returns(uint256)
  169. func (_Collect *CollectSession) BaseDistribution() (*big.Int, error) {
  170. return _Collect.Contract.BaseDistribution(&_Collect.CallOpts)
  171. }
  172. // BaseDistribution is a free data retrieval call binding the contract method 0x6a97e1a6.
  173. //
  174. // Solidity: function _baseDistribution() view returns(uint256)
  175. func (_Collect *CollectCallerSession) BaseDistribution() (*big.Int, error) {
  176. return _Collect.Contract.BaseDistribution(&_Collect.CallOpts)
  177. }
  178. // BaseReward is a free data retrieval call binding the contract method 0xb0c466d8.
  179. //
  180. // Solidity: function _baseReward() view returns(uint256)
  181. func (_Collect *CollectCaller) BaseReward(opts *bind.CallOpts) (*big.Int, error) {
  182. var out []interface{}
  183. err := _Collect.contract.Call(opts, &out, "_baseReward")
  184. if err != nil {
  185. return *new(*big.Int), err
  186. }
  187. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  188. return out0, err
  189. }
  190. // BaseReward is a free data retrieval call binding the contract method 0xb0c466d8.
  191. //
  192. // Solidity: function _baseReward() view returns(uint256)
  193. func (_Collect *CollectSession) BaseReward() (*big.Int, error) {
  194. return _Collect.Contract.BaseReward(&_Collect.CallOpts)
  195. }
  196. // BaseReward is a free data retrieval call binding the contract method 0xb0c466d8.
  197. //
  198. // Solidity: function _baseReward() view returns(uint256)
  199. func (_Collect *CollectCallerSession) BaseReward() (*big.Int, error) {
  200. return _Collect.Contract.BaseReward(&_Collect.CallOpts)
  201. }
  202. // BaseValue is a free data retrieval call binding the contract method 0x138efbaf.
  203. //
  204. // Solidity: function _baseValue() view returns(uint256)
  205. func (_Collect *CollectCaller) BaseValue(opts *bind.CallOpts) (*big.Int, error) {
  206. var out []interface{}
  207. err := _Collect.contract.Call(opts, &out, "_baseValue")
  208. if err != nil {
  209. return *new(*big.Int), err
  210. }
  211. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  212. return out0, err
  213. }
  214. // BaseValue is a free data retrieval call binding the contract method 0x138efbaf.
  215. //
  216. // Solidity: function _baseValue() view returns(uint256)
  217. func (_Collect *CollectSession) BaseValue() (*big.Int, error) {
  218. return _Collect.Contract.BaseValue(&_Collect.CallOpts)
  219. }
  220. // BaseValue is a free data retrieval call binding the contract method 0x138efbaf.
  221. //
  222. // Solidity: function _baseValue() view returns(uint256)
  223. func (_Collect *CollectCallerSession) BaseValue() (*big.Int, error) {
  224. return _Collect.Contract.BaseValue(&_Collect.CallOpts)
  225. }
  226. // Community is a free data retrieval call binding the contract method 0x723bc11a.
  227. //
  228. // Solidity: function _community() view returns(address)
  229. func (_Collect *CollectCaller) Community(opts *bind.CallOpts) (common.Address, error) {
  230. var out []interface{}
  231. err := _Collect.contract.Call(opts, &out, "_community")
  232. if err != nil {
  233. return *new(common.Address), err
  234. }
  235. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  236. return out0, err
  237. }
  238. // Community is a free data retrieval call binding the contract method 0x723bc11a.
  239. //
  240. // Solidity: function _community() view returns(address)
  241. func (_Collect *CollectSession) Community() (common.Address, error) {
  242. return _Collect.Contract.Community(&_Collect.CallOpts)
  243. }
  244. // Community is a free data retrieval call binding the contract method 0x723bc11a.
  245. //
  246. // Solidity: function _community() view returns(address)
  247. func (_Collect *CollectCallerSession) Community() (common.Address, error) {
  248. return _Collect.Contract.Community(&_Collect.CallOpts)
  249. }
  250. // DevAddress is a free data retrieval call binding the contract method 0x6af65929.
  251. //
  252. // Solidity: function _devAddress() view returns(address)
  253. func (_Collect *CollectCaller) DevAddress(opts *bind.CallOpts) (common.Address, error) {
  254. var out []interface{}
  255. err := _Collect.contract.Call(opts, &out, "_devAddress")
  256. if err != nil {
  257. return *new(common.Address), err
  258. }
  259. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  260. return out0, err
  261. }
  262. // DevAddress is a free data retrieval call binding the contract method 0x6af65929.
  263. //
  264. // Solidity: function _devAddress() view returns(address)
  265. func (_Collect *CollectSession) DevAddress() (common.Address, error) {
  266. return _Collect.Contract.DevAddress(&_Collect.CallOpts)
  267. }
  268. // DevAddress is a free data retrieval call binding the contract method 0x6af65929.
  269. //
  270. // Solidity: function _devAddress() view returns(address)
  271. func (_Collect *CollectCallerSession) DevAddress() (common.Address, error) {
  272. return _Collect.Contract.DevAddress(&_Collect.CallOpts)
  273. }
  274. // ReinputLimit is a free data retrieval call binding the contract method 0xe975e999.
  275. //
  276. // Solidity: function _reinputLimit() view returns(uint256)
  277. func (_Collect *CollectCaller) ReinputLimit(opts *bind.CallOpts) (*big.Int, error) {
  278. var out []interface{}
  279. err := _Collect.contract.Call(opts, &out, "_reinputLimit")
  280. if err != nil {
  281. return *new(*big.Int), err
  282. }
  283. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  284. return out0, err
  285. }
  286. // ReinputLimit is a free data retrieval call binding the contract method 0xe975e999.
  287. //
  288. // Solidity: function _reinputLimit() view returns(uint256)
  289. func (_Collect *CollectSession) ReinputLimit() (*big.Int, error) {
  290. return _Collect.Contract.ReinputLimit(&_Collect.CallOpts)
  291. }
  292. // ReinputLimit is a free data retrieval call binding the contract method 0xe975e999.
  293. //
  294. // Solidity: function _reinputLimit() view returns(uint256)
  295. func (_Collect *CollectCallerSession) ReinputLimit() (*big.Int, error) {
  296. return _Collect.Contract.ReinputLimit(&_Collect.CallOpts)
  297. }
  298. // ReinputModBase is a free data retrieval call binding the contract method 0xf517767f.
  299. //
  300. // Solidity: function _reinputModBase() view returns(uint256)
  301. func (_Collect *CollectCaller) ReinputModBase(opts *bind.CallOpts) (*big.Int, error) {
  302. var out []interface{}
  303. err := _Collect.contract.Call(opts, &out, "_reinputModBase")
  304. if err != nil {
  305. return *new(*big.Int), err
  306. }
  307. out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
  308. return out0, err
  309. }
  310. // ReinputModBase is a free data retrieval call binding the contract method 0xf517767f.
  311. //
  312. // Solidity: function _reinputModBase() view returns(uint256)
  313. func (_Collect *CollectSession) ReinputModBase() (*big.Int, error) {
  314. return _Collect.Contract.ReinputModBase(&_Collect.CallOpts)
  315. }
  316. // ReinputModBase is a free data retrieval call binding the contract method 0xf517767f.
  317. //
  318. // Solidity: function _reinputModBase() view returns(uint256)
  319. func (_Collect *CollectCallerSession) ReinputModBase() (*big.Int, error) {
  320. return _Collect.Contract.ReinputModBase(&_Collect.CallOpts)
  321. }
  322. // Technical is a free data retrieval call binding the contract method 0x37a56907.
  323. //
  324. // Solidity: function _technical() view returns(address)
  325. func (_Collect *CollectCaller) Technical(opts *bind.CallOpts) (common.Address, error) {
  326. var out []interface{}
  327. err := _Collect.contract.Call(opts, &out, "_technical")
  328. if err != nil {
  329. return *new(common.Address), err
  330. }
  331. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  332. return out0, err
  333. }
  334. // Technical is a free data retrieval call binding the contract method 0x37a56907.
  335. //
  336. // Solidity: function _technical() view returns(address)
  337. func (_Collect *CollectSession) Technical() (common.Address, error) {
  338. return _Collect.Contract.Technical(&_Collect.CallOpts)
  339. }
  340. // Technical is a free data retrieval call binding the contract method 0x37a56907.
  341. //
  342. // Solidity: function _technical() view returns(address)
  343. func (_Collect *CollectCallerSession) Technical() (common.Address, error) {
  344. return _Collect.Contract.Technical(&_Collect.CallOpts)
  345. }
  346. // GetDigit is a free data retrieval call binding the contract method 0x6b590248.
  347. //
  348. // Solidity: function getDigit() view returns(string)
  349. func (_Collect *CollectCaller) GetDigit(opts *bind.CallOpts) (string, error) {
  350. var out []interface{}
  351. err := _Collect.contract.Call(opts, &out, "getDigit")
  352. if err != nil {
  353. return *new(string), err
  354. }
  355. out0 := *abi.ConvertType(out[0], new(string)).(*string)
  356. return out0, err
  357. }
  358. // GetDigit is a free data retrieval call binding the contract method 0x6b590248.
  359. //
  360. // Solidity: function getDigit() view returns(string)
  361. func (_Collect *CollectSession) GetDigit() (string, error) {
  362. return _Collect.Contract.GetDigit(&_Collect.CallOpts)
  363. }
  364. // GetDigit is a free data retrieval call binding the contract method 0x6b590248.
  365. //
  366. // Solidity: function getDigit() view returns(string)
  367. func (_Collect *CollectCallerSession) GetDigit() (string, error) {
  368. return _Collect.Contract.GetDigit(&_Collect.CallOpts)
  369. }
  370. // Managers is a free data retrieval call binding the contract method 0xfdff9b4d.
  371. //
  372. // Solidity: function managers(address ) view returns(bool)
  373. func (_Collect *CollectCaller) Managers(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
  374. var out []interface{}
  375. err := _Collect.contract.Call(opts, &out, "managers", arg0)
  376. if err != nil {
  377. return *new(bool), err
  378. }
  379. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  380. return out0, err
  381. }
  382. // Managers is a free data retrieval call binding the contract method 0xfdff9b4d.
  383. //
  384. // Solidity: function managers(address ) view returns(bool)
  385. func (_Collect *CollectSession) Managers(arg0 common.Address) (bool, error) {
  386. return _Collect.Contract.Managers(&_Collect.CallOpts, arg0)
  387. }
  388. // Managers is a free data retrieval call binding the contract method 0xfdff9b4d.
  389. //
  390. // Solidity: function managers(address ) view returns(bool)
  391. func (_Collect *CollectCallerSession) Managers(arg0 common.Address) (bool, error) {
  392. return _Collect.Contract.Managers(&_Collect.CallOpts, arg0)
  393. }
  394. // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
  395. //
  396. // Solidity: function owner() view returns(address)
  397. func (_Collect *CollectCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
  398. var out []interface{}
  399. err := _Collect.contract.Call(opts, &out, "owner")
  400. if err != nil {
  401. return *new(common.Address), err
  402. }
  403. out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
  404. return out0, err
  405. }
  406. // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
  407. //
  408. // Solidity: function owner() view returns(address)
  409. func (_Collect *CollectSession) Owner() (common.Address, error) {
  410. return _Collect.Contract.Owner(&_Collect.CallOpts)
  411. }
  412. // Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
  413. //
  414. // Solidity: function owner() view returns(address)
  415. func (_Collect *CollectCallerSession) Owner() (common.Address, error) {
  416. return _Collect.Contract.Owner(&_Collect.CallOpts)
  417. }
  418. // Verify is a free data retrieval call binding the contract method 0x6cd80733.
  419. //
  420. // Solidity: function verify(uint256 amount, string signTime, bytes32 signature) view returns(bool)
  421. func (_Collect *CollectCaller) Verify(opts *bind.CallOpts, amount *big.Int, signTime string, signature [32]byte) (bool, error) {
  422. var out []interface{}
  423. err := _Collect.contract.Call(opts, &out, "verify", amount, signTime, signature)
  424. if err != nil {
  425. return *new(bool), err
  426. }
  427. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  428. return out0, err
  429. }
  430. // Verify is a free data retrieval call binding the contract method 0x6cd80733.
  431. //
  432. // Solidity: function verify(uint256 amount, string signTime, bytes32 signature) view returns(bool)
  433. func (_Collect *CollectSession) Verify(amount *big.Int, signTime string, signature [32]byte) (bool, error) {
  434. return _Collect.Contract.Verify(&_Collect.CallOpts, amount, signTime, signature)
  435. }
  436. // Verify is a free data retrieval call binding the contract method 0x6cd80733.
  437. //
  438. // Solidity: function verify(uint256 amount, string signTime, bytes32 signature) view returns(bool)
  439. func (_Collect *CollectCallerSession) Verify(amount *big.Int, signTime string, signature [32]byte) (bool, error) {
  440. return _Collect.Contract.Verify(&_Collect.CallOpts, amount, signTime, signature)
  441. }
  442. // VerifySignature is a free data retrieval call binding the contract method 0x19ba5284.
  443. //
  444. // Solidity: function verifySignature(uint256 _amount, string _time, address _user, bytes32 _sign) view returns(bool)
  445. func (_Collect *CollectCaller) VerifySignature(opts *bind.CallOpts, _amount *big.Int, _time string, _user common.Address, _sign [32]byte) (bool, error) {
  446. var out []interface{}
  447. err := _Collect.contract.Call(opts, &out, "verifySignature", _amount, _time, _user, _sign)
  448. if err != nil {
  449. return *new(bool), err
  450. }
  451. out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
  452. return out0, err
  453. }
  454. // VerifySignature is a free data retrieval call binding the contract method 0x19ba5284.
  455. //
  456. // Solidity: function verifySignature(uint256 _amount, string _time, address _user, bytes32 _sign) view returns(bool)
  457. func (_Collect *CollectSession) VerifySignature(_amount *big.Int, _time string, _user common.Address, _sign [32]byte) (bool, error) {
  458. return _Collect.Contract.VerifySignature(&_Collect.CallOpts, _amount, _time, _user, _sign)
  459. }
  460. // VerifySignature is a free data retrieval call binding the contract method 0x19ba5284.
  461. //
  462. // Solidity: function verifySignature(uint256 _amount, string _time, address _user, bytes32 _sign) view returns(bool)
  463. func (_Collect *CollectCallerSession) VerifySignature(_amount *big.Int, _time string, _user common.Address, _sign [32]byte) (bool, error) {
  464. return _Collect.Contract.VerifySignature(&_Collect.CallOpts, _amount, _time, _user, _sign)
  465. }
  466. // ClaimRewards is a paid mutator transaction binding the contract method 0xd56099aa.
  467. //
  468. // Solidity: function claimRewards(uint256 claimValue, string signTime, bytes32 signature) returns()
  469. func (_Collect *CollectTransactor) ClaimRewards(opts *bind.TransactOpts, claimValue *big.Int, signTime string, signature [32]byte) (*types.Transaction, error) {
  470. return _Collect.contract.Transact(opts, "claimRewards", claimValue, signTime, signature)
  471. }
  472. // ClaimRewards is a paid mutator transaction binding the contract method 0xd56099aa.
  473. //
  474. // Solidity: function claimRewards(uint256 claimValue, string signTime, bytes32 signature) returns()
  475. func (_Collect *CollectSession) ClaimRewards(claimValue *big.Int, signTime string, signature [32]byte) (*types.Transaction, error) {
  476. return _Collect.Contract.ClaimRewards(&_Collect.TransactOpts, claimValue, signTime, signature)
  477. }
  478. // ClaimRewards is a paid mutator transaction binding the contract method 0xd56099aa.
  479. //
  480. // Solidity: function claimRewards(uint256 claimValue, string signTime, bytes32 signature) returns()
  481. func (_Collect *CollectTransactorSession) ClaimRewards(claimValue *big.Int, signTime string, signature [32]byte) (*types.Transaction, error) {
  482. return _Collect.Contract.ClaimRewards(&_Collect.TransactOpts, claimValue, signTime, signature)
  483. }
  484. // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c.
  485. //
  486. // Solidity: function initialize() returns()
  487. func (_Collect *CollectTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) {
  488. return _Collect.contract.Transact(opts, "initialize")
  489. }
  490. // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c.
  491. //
  492. // Solidity: function initialize() returns()
  493. func (_Collect *CollectSession) Initialize() (*types.Transaction, error) {
  494. return _Collect.Contract.Initialize(&_Collect.TransactOpts)
  495. }
  496. // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c.
  497. //
  498. // Solidity: function initialize() returns()
  499. func (_Collect *CollectTransactorSession) Initialize() (*types.Transaction, error) {
  500. return _Collect.Contract.Initialize(&_Collect.TransactOpts)
  501. }
  502. // Initialize0 is a paid mutator transaction binding the contract method 0xc0c53b8b.
  503. //
  504. // Solidity: function initialize(address community, address technical, address devAddress) returns()
  505. func (_Collect *CollectTransactor) Initialize0(opts *bind.TransactOpts, community common.Address, technical common.Address, devAddress common.Address) (*types.Transaction, error) {
  506. return _Collect.contract.Transact(opts, "initialize0", community, technical, devAddress)
  507. }
  508. // Initialize0 is a paid mutator transaction binding the contract method 0xc0c53b8b.
  509. //
  510. // Solidity: function initialize(address community, address technical, address devAddress) returns()
  511. func (_Collect *CollectSession) Initialize0(community common.Address, technical common.Address, devAddress common.Address) (*types.Transaction, error) {
  512. return _Collect.Contract.Initialize0(&_Collect.TransactOpts, community, technical, devAddress)
  513. }
  514. // Initialize0 is a paid mutator transaction binding the contract method 0xc0c53b8b.
  515. //
  516. // Solidity: function initialize(address community, address technical, address devAddress) returns()
  517. func (_Collect *CollectTransactorSession) Initialize0(community common.Address, technical common.Address, devAddress common.Address) (*types.Transaction, error) {
  518. return _Collect.Contract.Initialize0(&_Collect.TransactOpts, community, technical, devAddress)
  519. }
  520. // Participate is a paid mutator transaction binding the contract method 0xb91038c7.
  521. //
  522. // Solidity: function participate(address inviter) payable returns()
  523. func (_Collect *CollectTransactor) Participate(opts *bind.TransactOpts, inviter common.Address) (*types.Transaction, error) {
  524. return _Collect.contract.Transact(opts, "participate", inviter)
  525. }
  526. // Participate is a paid mutator transaction binding the contract method 0xb91038c7.
  527. //
  528. // Solidity: function participate(address inviter) payable returns()
  529. func (_Collect *CollectSession) Participate(inviter common.Address) (*types.Transaction, error) {
  530. return _Collect.Contract.Participate(&_Collect.TransactOpts, inviter)
  531. }
  532. // Participate is a paid mutator transaction binding the contract method 0xb91038c7.
  533. //
  534. // Solidity: function participate(address inviter) payable returns()
  535. func (_Collect *CollectTransactorSession) Participate(inviter common.Address) (*types.Transaction, error) {
  536. return _Collect.Contract.Participate(&_Collect.TransactOpts, inviter)
  537. }
  538. // RemoveManager is a paid mutator transaction binding the contract method 0xac18de43.
  539. //
  540. // Solidity: function removeManager(address _manager) returns()
  541. func (_Collect *CollectTransactor) RemoveManager(opts *bind.TransactOpts, _manager common.Address) (*types.Transaction, error) {
  542. return _Collect.contract.Transact(opts, "removeManager", _manager)
  543. }
  544. // RemoveManager is a paid mutator transaction binding the contract method 0xac18de43.
  545. //
  546. // Solidity: function removeManager(address _manager) returns()
  547. func (_Collect *CollectSession) RemoveManager(_manager common.Address) (*types.Transaction, error) {
  548. return _Collect.Contract.RemoveManager(&_Collect.TransactOpts, _manager)
  549. }
  550. // RemoveManager is a paid mutator transaction binding the contract method 0xac18de43.
  551. //
  552. // Solidity: function removeManager(address _manager) returns()
  553. func (_Collect *CollectTransactorSession) RemoveManager(_manager common.Address) (*types.Transaction, error) {
  554. return _Collect.Contract.RemoveManager(&_Collect.TransactOpts, _manager)
  555. }
  556. // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
  557. //
  558. // Solidity: function renounceOwnership() returns()
  559. func (_Collect *CollectTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
  560. return _Collect.contract.Transact(opts, "renounceOwnership")
  561. }
  562. // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
  563. //
  564. // Solidity: function renounceOwnership() returns()
  565. func (_Collect *CollectSession) RenounceOwnership() (*types.Transaction, error) {
  566. return _Collect.Contract.RenounceOwnership(&_Collect.TransactOpts)
  567. }
  568. // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
  569. //
  570. // Solidity: function renounceOwnership() returns()
  571. func (_Collect *CollectTransactorSession) RenounceOwnership() (*types.Transaction, error) {
  572. return _Collect.Contract.RenounceOwnership(&_Collect.TransactOpts)
  573. }
  574. // SetBaseDistribution is a paid mutator transaction binding the contract method 0x96214d3b.
  575. //
  576. // Solidity: function setBaseDistribution(uint256 dis) returns()
  577. func (_Collect *CollectTransactor) SetBaseDistribution(opts *bind.TransactOpts, dis *big.Int) (*types.Transaction, error) {
  578. return _Collect.contract.Transact(opts, "setBaseDistribution", dis)
  579. }
  580. // SetBaseDistribution is a paid mutator transaction binding the contract method 0x96214d3b.
  581. //
  582. // Solidity: function setBaseDistribution(uint256 dis) returns()
  583. func (_Collect *CollectSession) SetBaseDistribution(dis *big.Int) (*types.Transaction, error) {
  584. return _Collect.Contract.SetBaseDistribution(&_Collect.TransactOpts, dis)
  585. }
  586. // SetBaseDistribution is a paid mutator transaction binding the contract method 0x96214d3b.
  587. //
  588. // Solidity: function setBaseDistribution(uint256 dis) returns()
  589. func (_Collect *CollectTransactorSession) SetBaseDistribution(dis *big.Int) (*types.Transaction, error) {
  590. return _Collect.Contract.SetBaseDistribution(&_Collect.TransactOpts, dis)
  591. }
  592. // SetBaseReward is a paid mutator transaction binding the contract method 0x0373a23a.
  593. //
  594. // Solidity: function setBaseReward(uint256 baseReward) returns()
  595. func (_Collect *CollectTransactor) SetBaseReward(opts *bind.TransactOpts, baseReward *big.Int) (*types.Transaction, error) {
  596. return _Collect.contract.Transact(opts, "setBaseReward", baseReward)
  597. }
  598. // SetBaseReward is a paid mutator transaction binding the contract method 0x0373a23a.
  599. //
  600. // Solidity: function setBaseReward(uint256 baseReward) returns()
  601. func (_Collect *CollectSession) SetBaseReward(baseReward *big.Int) (*types.Transaction, error) {
  602. return _Collect.Contract.SetBaseReward(&_Collect.TransactOpts, baseReward)
  603. }
  604. // SetBaseReward is a paid mutator transaction binding the contract method 0x0373a23a.
  605. //
  606. // Solidity: function setBaseReward(uint256 baseReward) returns()
  607. func (_Collect *CollectTransactorSession) SetBaseReward(baseReward *big.Int) (*types.Transaction, error) {
  608. return _Collect.Contract.SetBaseReward(&_Collect.TransactOpts, baseReward)
  609. }
  610. // SetBaseValue is a paid mutator transaction binding the contract method 0x3faf24a1.
  611. //
  612. // Solidity: function setBaseValue(uint256 value) returns()
  613. func (_Collect *CollectTransactor) SetBaseValue(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) {
  614. return _Collect.contract.Transact(opts, "setBaseValue", value)
  615. }
  616. // SetBaseValue is a paid mutator transaction binding the contract method 0x3faf24a1.
  617. //
  618. // Solidity: function setBaseValue(uint256 value) returns()
  619. func (_Collect *CollectSession) SetBaseValue(value *big.Int) (*types.Transaction, error) {
  620. return _Collect.Contract.SetBaseValue(&_Collect.TransactOpts, value)
  621. }
  622. // SetBaseValue is a paid mutator transaction binding the contract method 0x3faf24a1.
  623. //
  624. // Solidity: function setBaseValue(uint256 value) returns()
  625. func (_Collect *CollectTransactorSession) SetBaseValue(value *big.Int) (*types.Transaction, error) {
  626. return _Collect.Contract.SetBaseValue(&_Collect.TransactOpts, value)
  627. }
  628. // SetDigit is a paid mutator transaction binding the contract method 0x4dbfaecf.
  629. //
  630. // Solidity: function setDigit(string _digit) returns()
  631. func (_Collect *CollectTransactor) SetDigit(opts *bind.TransactOpts, _digit string) (*types.Transaction, error) {
  632. return _Collect.contract.Transact(opts, "setDigit", _digit)
  633. }
  634. // SetDigit is a paid mutator transaction binding the contract method 0x4dbfaecf.
  635. //
  636. // Solidity: function setDigit(string _digit) returns()
  637. func (_Collect *CollectSession) SetDigit(_digit string) (*types.Transaction, error) {
  638. return _Collect.Contract.SetDigit(&_Collect.TransactOpts, _digit)
  639. }
  640. // SetDigit is a paid mutator transaction binding the contract method 0x4dbfaecf.
  641. //
  642. // Solidity: function setDigit(string _digit) returns()
  643. func (_Collect *CollectTransactorSession) SetDigit(_digit string) (*types.Transaction, error) {
  644. return _Collect.Contract.SetDigit(&_Collect.TransactOpts, _digit)
  645. }
  646. // SetManager is a paid mutator transaction binding the contract method 0xd0ebdbe7.
  647. //
  648. // Solidity: function setManager(address _manager) returns()
  649. func (_Collect *CollectTransactor) SetManager(opts *bind.TransactOpts, _manager common.Address) (*types.Transaction, error) {
  650. return _Collect.contract.Transact(opts, "setManager", _manager)
  651. }
  652. // SetManager is a paid mutator transaction binding the contract method 0xd0ebdbe7.
  653. //
  654. // Solidity: function setManager(address _manager) returns()
  655. func (_Collect *CollectSession) SetManager(_manager common.Address) (*types.Transaction, error) {
  656. return _Collect.Contract.SetManager(&_Collect.TransactOpts, _manager)
  657. }
  658. // SetManager is a paid mutator transaction binding the contract method 0xd0ebdbe7.
  659. //
  660. // Solidity: function setManager(address _manager) returns()
  661. func (_Collect *CollectTransactorSession) SetManager(_manager common.Address) (*types.Transaction, error) {
  662. return _Collect.Contract.SetManager(&_Collect.TransactOpts, _manager)
  663. }
  664. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
  665. //
  666. // Solidity: function transferOwnership(address newOwner) returns()
  667. func (_Collect *CollectTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
  668. return _Collect.contract.Transact(opts, "transferOwnership", newOwner)
  669. }
  670. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
  671. //
  672. // Solidity: function transferOwnership(address newOwner) returns()
  673. func (_Collect *CollectSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
  674. return _Collect.Contract.TransferOwnership(&_Collect.TransactOpts, newOwner)
  675. }
  676. // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
  677. //
  678. // Solidity: function transferOwnership(address newOwner) returns()
  679. func (_Collect *CollectTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
  680. return _Collect.Contract.TransferOwnership(&_Collect.TransactOpts, newOwner)
  681. }
  682. // Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
  683. //
  684. // Solidity: function withdraw(uint256 amount) returns()
  685. func (_Collect *CollectTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) {
  686. return _Collect.contract.Transact(opts, "withdraw", amount)
  687. }
  688. // Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
  689. //
  690. // Solidity: function withdraw(uint256 amount) returns()
  691. func (_Collect *CollectSession) Withdraw(amount *big.Int) (*types.Transaction, error) {
  692. return _Collect.Contract.Withdraw(&_Collect.TransactOpts, amount)
  693. }
  694. // Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
  695. //
  696. // Solidity: function withdraw(uint256 amount) returns()
  697. func (_Collect *CollectTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error) {
  698. return _Collect.Contract.Withdraw(&_Collect.TransactOpts, amount)
  699. }
  700. // CollectClaimIterator is returned from FilterClaim and is used to iterate over the raw logs and unpacked data for Claim events raised by the Collect contract.
  701. type CollectClaimIterator struct {
  702. Event *CollectClaim // Event containing the contract specifics and raw log
  703. contract *bind.BoundContract // Generic contract to use for unpacking event data
  704. event string // Event name to use for unpacking event data
  705. logs chan types.Log // Log channel receiving the found contract events
  706. sub ethereum.Subscription // Subscription for errors, completion and termination
  707. done bool // Whether the subscription completed delivering logs
  708. fail error // Occurred error to stop iteration
  709. }
  710. // Next advances the iterator to the subsequent event, returning whether there
  711. // are any more events found. In case of a retrieval or parsing error, false is
  712. // returned and Error() can be queried for the exact failure.
  713. func (it *CollectClaimIterator) Next() bool {
  714. // If the iterator failed, stop iterating
  715. if it.fail != nil {
  716. return false
  717. }
  718. // If the iterator completed, deliver directly whatever's available
  719. if it.done {
  720. select {
  721. case log := <-it.logs:
  722. it.Event = new(CollectClaim)
  723. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  724. it.fail = err
  725. return false
  726. }
  727. it.Event.Raw = log
  728. return true
  729. default:
  730. return false
  731. }
  732. }
  733. // Iterator still in progress, wait for either a data or an error event
  734. select {
  735. case log := <-it.logs:
  736. it.Event = new(CollectClaim)
  737. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  738. it.fail = err
  739. return false
  740. }
  741. it.Event.Raw = log
  742. return true
  743. case err := <-it.sub.Err():
  744. it.done = true
  745. it.fail = err
  746. return it.Next()
  747. }
  748. }
  749. // Error returns any retrieval or parsing error occurred during filtering.
  750. func (it *CollectClaimIterator) Error() error {
  751. return it.fail
  752. }
  753. // Close terminates the iteration process, releasing any pending underlying
  754. // resources.
  755. func (it *CollectClaimIterator) Close() error {
  756. it.sub.Unsubscribe()
  757. return nil
  758. }
  759. // CollectClaim represents a Claim event raised by the Collect contract.
  760. type CollectClaim struct {
  761. User common.Address
  762. Amount *big.Int
  763. Raw types.Log // Blockchain specific contextual infos
  764. }
  765. // FilterClaim is a free log retrieval operation binding the contract event 0x47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4.
  766. //
  767. // Solidity: event Claim(address user, uint256 amount)
  768. func (_Collect *CollectFilterer) FilterClaim(opts *bind.FilterOpts) (*CollectClaimIterator, error) {
  769. logs, sub, err := _Collect.contract.FilterLogs(opts, "Claim")
  770. if err != nil {
  771. return nil, err
  772. }
  773. return &CollectClaimIterator{contract: _Collect.contract, event: "Claim", logs: logs, sub: sub}, nil
  774. }
  775. // WatchClaim is a free log subscription operation binding the contract event 0x47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4.
  776. //
  777. // Solidity: event Claim(address user, uint256 amount)
  778. func (_Collect *CollectFilterer) WatchClaim(opts *bind.WatchOpts, sink chan<- *CollectClaim) (event.Subscription, error) {
  779. logs, sub, err := _Collect.contract.WatchLogs(opts, "Claim")
  780. if err != nil {
  781. return nil, err
  782. }
  783. return event.NewSubscription(func(quit <-chan struct{}) error {
  784. defer sub.Unsubscribe()
  785. for {
  786. select {
  787. case log := <-logs:
  788. // New log arrived, parse the event and forward to the user
  789. event := new(CollectClaim)
  790. if err := _Collect.contract.UnpackLog(event, "Claim", log); err != nil {
  791. return err
  792. }
  793. event.Raw = log
  794. select {
  795. case sink <- event:
  796. case err := <-sub.Err():
  797. return err
  798. case <-quit:
  799. return nil
  800. }
  801. case err := <-sub.Err():
  802. return err
  803. case <-quit:
  804. return nil
  805. }
  806. }
  807. }), nil
  808. }
  809. // ParseClaim is a log parse operation binding the contract event 0x47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4.
  810. //
  811. // Solidity: event Claim(address user, uint256 amount)
  812. func (_Collect *CollectFilterer) ParseClaim(log types.Log) (*CollectClaim, error) {
  813. event := new(CollectClaim)
  814. if err := _Collect.contract.UnpackLog(event, "Claim", log); err != nil {
  815. return nil, err
  816. }
  817. event.Raw = log
  818. return event, nil
  819. }
  820. // CollectOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Collect contract.
  821. type CollectOwnershipTransferredIterator struct {
  822. Event *CollectOwnershipTransferred // Event containing the contract specifics and raw log
  823. contract *bind.BoundContract // Generic contract to use for unpacking event data
  824. event string // Event name to use for unpacking event data
  825. logs chan types.Log // Log channel receiving the found contract events
  826. sub ethereum.Subscription // Subscription for errors, completion and termination
  827. done bool // Whether the subscription completed delivering logs
  828. fail error // Occurred error to stop iteration
  829. }
  830. // Next advances the iterator to the subsequent event, returning whether there
  831. // are any more events found. In case of a retrieval or parsing error, false is
  832. // returned and Error() can be queried for the exact failure.
  833. func (it *CollectOwnershipTransferredIterator) Next() bool {
  834. // If the iterator failed, stop iterating
  835. if it.fail != nil {
  836. return false
  837. }
  838. // If the iterator completed, deliver directly whatever's available
  839. if it.done {
  840. select {
  841. case log := <-it.logs:
  842. it.Event = new(CollectOwnershipTransferred)
  843. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  844. it.fail = err
  845. return false
  846. }
  847. it.Event.Raw = log
  848. return true
  849. default:
  850. return false
  851. }
  852. }
  853. // Iterator still in progress, wait for either a data or an error event
  854. select {
  855. case log := <-it.logs:
  856. it.Event = new(CollectOwnershipTransferred)
  857. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  858. it.fail = err
  859. return false
  860. }
  861. it.Event.Raw = log
  862. return true
  863. case err := <-it.sub.Err():
  864. it.done = true
  865. it.fail = err
  866. return it.Next()
  867. }
  868. }
  869. // Error returns any retrieval or parsing error occurred during filtering.
  870. func (it *CollectOwnershipTransferredIterator) Error() error {
  871. return it.fail
  872. }
  873. // Close terminates the iteration process, releasing any pending underlying
  874. // resources.
  875. func (it *CollectOwnershipTransferredIterator) Close() error {
  876. it.sub.Unsubscribe()
  877. return nil
  878. }
  879. // CollectOwnershipTransferred represents a OwnershipTransferred event raised by the Collect contract.
  880. type CollectOwnershipTransferred struct {
  881. PreviousOwner common.Address
  882. NewOwner common.Address
  883. Raw types.Log // Blockchain specific contextual infos
  884. }
  885. // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  886. //
  887. // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  888. func (_Collect *CollectFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*CollectOwnershipTransferredIterator, error) {
  889. var previousOwnerRule []interface{}
  890. for _, previousOwnerItem := range previousOwner {
  891. previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
  892. }
  893. var newOwnerRule []interface{}
  894. for _, newOwnerItem := range newOwner {
  895. newOwnerRule = append(newOwnerRule, newOwnerItem)
  896. }
  897. logs, sub, err := _Collect.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
  898. if err != nil {
  899. return nil, err
  900. }
  901. return &CollectOwnershipTransferredIterator{contract: _Collect.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
  902. }
  903. // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  904. //
  905. // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  906. func (_Collect *CollectFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *CollectOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
  907. var previousOwnerRule []interface{}
  908. for _, previousOwnerItem := range previousOwner {
  909. previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
  910. }
  911. var newOwnerRule []interface{}
  912. for _, newOwnerItem := range newOwner {
  913. newOwnerRule = append(newOwnerRule, newOwnerItem)
  914. }
  915. logs, sub, err := _Collect.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
  916. if err != nil {
  917. return nil, err
  918. }
  919. return event.NewSubscription(func(quit <-chan struct{}) error {
  920. defer sub.Unsubscribe()
  921. for {
  922. select {
  923. case log := <-logs:
  924. // New log arrived, parse the event and forward to the user
  925. event := new(CollectOwnershipTransferred)
  926. if err := _Collect.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
  927. return err
  928. }
  929. event.Raw = log
  930. select {
  931. case sink <- event:
  932. case err := <-sub.Err():
  933. return err
  934. case <-quit:
  935. return nil
  936. }
  937. case err := <-sub.Err():
  938. return err
  939. case <-quit:
  940. return nil
  941. }
  942. }
  943. }), nil
  944. }
  945. // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
  946. //
  947. // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
  948. func (_Collect *CollectFilterer) ParseOwnershipTransferred(log types.Log) (*CollectOwnershipTransferred, error) {
  949. event := new(CollectOwnershipTransferred)
  950. if err := _Collect.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
  951. return nil, err
  952. }
  953. event.Raw = log
  954. return event, nil
  955. }
  956. // CollectParticipateIterator is returned from FilterParticipate and is used to iterate over the raw logs and unpacked data for Participate events raised by the Collect contract.
  957. type CollectParticipateIterator struct {
  958. Event *CollectParticipate // Event containing the contract specifics and raw log
  959. contract *bind.BoundContract // Generic contract to use for unpacking event data
  960. event string // Event name to use for unpacking event data
  961. logs chan types.Log // Log channel receiving the found contract events
  962. sub ethereum.Subscription // Subscription for errors, completion and termination
  963. done bool // Whether the subscription completed delivering logs
  964. fail error // Occurred error to stop iteration
  965. }
  966. // Next advances the iterator to the subsequent event, returning whether there
  967. // are any more events found. In case of a retrieval or parsing error, false is
  968. // returned and Error() can be queried for the exact failure.
  969. func (it *CollectParticipateIterator) Next() bool {
  970. // If the iterator failed, stop iterating
  971. if it.fail != nil {
  972. return false
  973. }
  974. // If the iterator completed, deliver directly whatever's available
  975. if it.done {
  976. select {
  977. case log := <-it.logs:
  978. it.Event = new(CollectParticipate)
  979. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  980. it.fail = err
  981. return false
  982. }
  983. it.Event.Raw = log
  984. return true
  985. default:
  986. return false
  987. }
  988. }
  989. // Iterator still in progress, wait for either a data or an error event
  990. select {
  991. case log := <-it.logs:
  992. it.Event = new(CollectParticipate)
  993. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  994. it.fail = err
  995. return false
  996. }
  997. it.Event.Raw = log
  998. return true
  999. case err := <-it.sub.Err():
  1000. it.done = true
  1001. it.fail = err
  1002. return it.Next()
  1003. }
  1004. }
  1005. // Error returns any retrieval or parsing error occurred during filtering.
  1006. func (it *CollectParticipateIterator) Error() error {
  1007. return it.fail
  1008. }
  1009. // Close terminates the iteration process, releasing any pending underlying
  1010. // resources.
  1011. func (it *CollectParticipateIterator) Close() error {
  1012. it.sub.Unsubscribe()
  1013. return nil
  1014. }
  1015. // CollectParticipate represents a Participate event raised by the Collect contract.
  1016. type CollectParticipate struct {
  1017. Participant common.Address
  1018. Inviter common.Address
  1019. Amount *big.Int
  1020. Raw types.Log // Blockchain specific contextual infos
  1021. }
  1022. // FilterParticipate is a free log retrieval operation binding the contract event 0x8ed860f76da405897619eab937f09dcb4d0d9b56cf68a3d489130a2489cf151f.
  1023. //
  1024. // Solidity: event Participate(address participant, address inviter, uint256 amount)
  1025. func (_Collect *CollectFilterer) FilterParticipate(opts *bind.FilterOpts) (*CollectParticipateIterator, error) {
  1026. logs, sub, err := _Collect.contract.FilterLogs(opts, "Participate")
  1027. if err != nil {
  1028. return nil, err
  1029. }
  1030. return &CollectParticipateIterator{contract: _Collect.contract, event: "Participate", logs: logs, sub: sub}, nil
  1031. }
  1032. // WatchParticipate is a free log subscription operation binding the contract event 0x8ed860f76da405897619eab937f09dcb4d0d9b56cf68a3d489130a2489cf151f.
  1033. //
  1034. // Solidity: event Participate(address participant, address inviter, uint256 amount)
  1035. func (_Collect *CollectFilterer) WatchParticipate(opts *bind.WatchOpts, sink chan<- *CollectParticipate) (event.Subscription, error) {
  1036. logs, sub, err := _Collect.contract.WatchLogs(opts, "Participate")
  1037. if err != nil {
  1038. return nil, err
  1039. }
  1040. return event.NewSubscription(func(quit <-chan struct{}) error {
  1041. defer sub.Unsubscribe()
  1042. for {
  1043. select {
  1044. case log := <-logs:
  1045. // New log arrived, parse the event and forward to the user
  1046. event := new(CollectParticipate)
  1047. if err := _Collect.contract.UnpackLog(event, "Participate", log); err != nil {
  1048. return err
  1049. }
  1050. event.Raw = log
  1051. select {
  1052. case sink <- event:
  1053. case err := <-sub.Err():
  1054. return err
  1055. case <-quit:
  1056. return nil
  1057. }
  1058. case err := <-sub.Err():
  1059. return err
  1060. case <-quit:
  1061. return nil
  1062. }
  1063. }
  1064. }), nil
  1065. }
  1066. // ParseParticipate is a log parse operation binding the contract event 0x8ed860f76da405897619eab937f09dcb4d0d9b56cf68a3d489130a2489cf151f.
  1067. //
  1068. // Solidity: event Participate(address participant, address inviter, uint256 amount)
  1069. func (_Collect *CollectFilterer) ParseParticipate(log types.Log) (*CollectParticipate, error) {
  1070. event := new(CollectParticipate)
  1071. if err := _Collect.contract.UnpackLog(event, "Participate", log); err != nil {
  1072. return nil, err
  1073. }
  1074. event.Raw = log
  1075. return event, nil
  1076. }
  1077. // CollectRemoveManagerIterator is returned from FilterRemoveManager and is used to iterate over the raw logs and unpacked data for RemoveManager events raised by the Collect contract.
  1078. type CollectRemoveManagerIterator struct {
  1079. Event *CollectRemoveManager // Event containing the contract specifics and raw log
  1080. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1081. event string // Event name to use for unpacking event data
  1082. logs chan types.Log // Log channel receiving the found contract events
  1083. sub ethereum.Subscription // Subscription for errors, completion and termination
  1084. done bool // Whether the subscription completed delivering logs
  1085. fail error // Occurred error to stop iteration
  1086. }
  1087. // Next advances the iterator to the subsequent event, returning whether there
  1088. // are any more events found. In case of a retrieval or parsing error, false is
  1089. // returned and Error() can be queried for the exact failure.
  1090. func (it *CollectRemoveManagerIterator) Next() bool {
  1091. // If the iterator failed, stop iterating
  1092. if it.fail != nil {
  1093. return false
  1094. }
  1095. // If the iterator completed, deliver directly whatever's available
  1096. if it.done {
  1097. select {
  1098. case log := <-it.logs:
  1099. it.Event = new(CollectRemoveManager)
  1100. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1101. it.fail = err
  1102. return false
  1103. }
  1104. it.Event.Raw = log
  1105. return true
  1106. default:
  1107. return false
  1108. }
  1109. }
  1110. // Iterator still in progress, wait for either a data or an error event
  1111. select {
  1112. case log := <-it.logs:
  1113. it.Event = new(CollectRemoveManager)
  1114. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1115. it.fail = err
  1116. return false
  1117. }
  1118. it.Event.Raw = log
  1119. return true
  1120. case err := <-it.sub.Err():
  1121. it.done = true
  1122. it.fail = err
  1123. return it.Next()
  1124. }
  1125. }
  1126. // Error returns any retrieval or parsing error occurred during filtering.
  1127. func (it *CollectRemoveManagerIterator) Error() error {
  1128. return it.fail
  1129. }
  1130. // Close terminates the iteration process, releasing any pending underlying
  1131. // resources.
  1132. func (it *CollectRemoveManagerIterator) Close() error {
  1133. it.sub.Unsubscribe()
  1134. return nil
  1135. }
  1136. // CollectRemoveManager represents a RemoveManager event raised by the Collect contract.
  1137. type CollectRemoveManager struct {
  1138. Manager common.Address
  1139. Raw types.Log // Blockchain specific contextual infos
  1140. }
  1141. // FilterRemoveManager is a free log retrieval operation binding the contract event 0x1e25ed4cabec84d314dc176241019653f237da01f2bdd3a10cb0f38b33da6763.
  1142. //
  1143. // Solidity: event RemoveManager(address _manager)
  1144. func (_Collect *CollectFilterer) FilterRemoveManager(opts *bind.FilterOpts) (*CollectRemoveManagerIterator, error) {
  1145. logs, sub, err := _Collect.contract.FilterLogs(opts, "RemoveManager")
  1146. if err != nil {
  1147. return nil, err
  1148. }
  1149. return &CollectRemoveManagerIterator{contract: _Collect.contract, event: "RemoveManager", logs: logs, sub: sub}, nil
  1150. }
  1151. // WatchRemoveManager is a free log subscription operation binding the contract event 0x1e25ed4cabec84d314dc176241019653f237da01f2bdd3a10cb0f38b33da6763.
  1152. //
  1153. // Solidity: event RemoveManager(address _manager)
  1154. func (_Collect *CollectFilterer) WatchRemoveManager(opts *bind.WatchOpts, sink chan<- *CollectRemoveManager) (event.Subscription, error) {
  1155. logs, sub, err := _Collect.contract.WatchLogs(opts, "RemoveManager")
  1156. if err != nil {
  1157. return nil, err
  1158. }
  1159. return event.NewSubscription(func(quit <-chan struct{}) error {
  1160. defer sub.Unsubscribe()
  1161. for {
  1162. select {
  1163. case log := <-logs:
  1164. // New log arrived, parse the event and forward to the user
  1165. event := new(CollectRemoveManager)
  1166. if err := _Collect.contract.UnpackLog(event, "RemoveManager", log); err != nil {
  1167. return err
  1168. }
  1169. event.Raw = log
  1170. select {
  1171. case sink <- event:
  1172. case err := <-sub.Err():
  1173. return err
  1174. case <-quit:
  1175. return nil
  1176. }
  1177. case err := <-sub.Err():
  1178. return err
  1179. case <-quit:
  1180. return nil
  1181. }
  1182. }
  1183. }), nil
  1184. }
  1185. // ParseRemoveManager is a log parse operation binding the contract event 0x1e25ed4cabec84d314dc176241019653f237da01f2bdd3a10cb0f38b33da6763.
  1186. //
  1187. // Solidity: event RemoveManager(address _manager)
  1188. func (_Collect *CollectFilterer) ParseRemoveManager(log types.Log) (*CollectRemoveManager, error) {
  1189. event := new(CollectRemoveManager)
  1190. if err := _Collect.contract.UnpackLog(event, "RemoveManager", log); err != nil {
  1191. return nil, err
  1192. }
  1193. event.Raw = log
  1194. return event, nil
  1195. }
  1196. // CollectSetManagerIterator is returned from FilterSetManager and is used to iterate over the raw logs and unpacked data for SetManager events raised by the Collect contract.
  1197. type CollectSetManagerIterator struct {
  1198. Event *CollectSetManager // Event containing the contract specifics and raw log
  1199. contract *bind.BoundContract // Generic contract to use for unpacking event data
  1200. event string // Event name to use for unpacking event data
  1201. logs chan types.Log // Log channel receiving the found contract events
  1202. sub ethereum.Subscription // Subscription for errors, completion and termination
  1203. done bool // Whether the subscription completed delivering logs
  1204. fail error // Occurred error to stop iteration
  1205. }
  1206. // Next advances the iterator to the subsequent event, returning whether there
  1207. // are any more events found. In case of a retrieval or parsing error, false is
  1208. // returned and Error() can be queried for the exact failure.
  1209. func (it *CollectSetManagerIterator) Next() bool {
  1210. // If the iterator failed, stop iterating
  1211. if it.fail != nil {
  1212. return false
  1213. }
  1214. // If the iterator completed, deliver directly whatever's available
  1215. if it.done {
  1216. select {
  1217. case log := <-it.logs:
  1218. it.Event = new(CollectSetManager)
  1219. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1220. it.fail = err
  1221. return false
  1222. }
  1223. it.Event.Raw = log
  1224. return true
  1225. default:
  1226. return false
  1227. }
  1228. }
  1229. // Iterator still in progress, wait for either a data or an error event
  1230. select {
  1231. case log := <-it.logs:
  1232. it.Event = new(CollectSetManager)
  1233. if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1234. it.fail = err
  1235. return false
  1236. }
  1237. it.Event.Raw = log
  1238. return true
  1239. case err := <-it.sub.Err():
  1240. it.done = true
  1241. it.fail = err
  1242. return it.Next()
  1243. }
  1244. }
  1245. // Error returns any retrieval or parsing error occurred during filtering.
  1246. func (it *CollectSetManagerIterator) Error() error {
  1247. return it.fail
  1248. }
  1249. // Close terminates the iteration process, releasing any pending underlying
  1250. // resources.
  1251. func (it *CollectSetManagerIterator) Close() error {
  1252. it.sub.Unsubscribe()
  1253. return nil
  1254. }
  1255. // CollectSetManager represents a SetManager event raised by the Collect contract.
  1256. type CollectSetManager struct {
  1257. Manager common.Address
  1258. Raw types.Log // Blockchain specific contextual infos
  1259. }
  1260. // FilterSetManager is a free log retrieval operation binding the contract event 0x54a6385aa0292b04e1ef8513253c17d1863f7cdfc87029d77fd55cc4c2e717e2.
  1261. //
  1262. // Solidity: event SetManager(address _manager)
  1263. func (_Collect *CollectFilterer) FilterSetManager(opts *bind.FilterOpts) (*CollectSetManagerIterator, error) {
  1264. logs, sub, err := _Collect.contract.FilterLogs(opts, "SetManager")
  1265. if err != nil {
  1266. return nil, err
  1267. }
  1268. return &CollectSetManagerIterator{contract: _Collect.contract, event: "SetManager", logs: logs, sub: sub}, nil
  1269. }
  1270. // WatchSetManager is a free log subscription operation binding the contract event 0x54a6385aa0292b04e1ef8513253c17d1863f7cdfc87029d77fd55cc4c2e717e2.
  1271. //
  1272. // Solidity: event SetManager(address _manager)
  1273. func (_Collect *CollectFilterer) WatchSetManager(opts *bind.WatchOpts, sink chan<- *CollectSetManager) (event.Subscription, error) {
  1274. logs, sub, err := _Collect.contract.WatchLogs(opts, "SetManager")
  1275. if err != nil {
  1276. return nil, err
  1277. }
  1278. return event.NewSubscription(func(quit <-chan struct{}) error {
  1279. defer sub.Unsubscribe()
  1280. for {
  1281. select {
  1282. case log := <-logs:
  1283. // New log arrived, parse the event and forward to the user
  1284. event := new(CollectSetManager)
  1285. if err := _Collect.contract.UnpackLog(event, "SetManager", log); err != nil {
  1286. return err
  1287. }
  1288. event.Raw = log
  1289. select {
  1290. case sink <- event:
  1291. case err := <-sub.Err():
  1292. return err
  1293. case <-quit:
  1294. return nil
  1295. }
  1296. case err := <-sub.Err():
  1297. return err
  1298. case <-quit:
  1299. return nil
  1300. }
  1301. }
  1302. }), nil
  1303. }
  1304. // ParseSetManager is a log parse operation binding the contract event 0x54a6385aa0292b04e1ef8513253c17d1863f7cdfc87029d77fd55cc4c2e717e2.
  1305. //
  1306. // Solidity: event SetManager(address _manager)
  1307. func (_Collect *CollectFilterer) ParseSetManager(log types.Log) (*CollectSetManager, error) {
  1308. event := new(CollectSetManager)
  1309. if err := _Collect.contract.UnpackLog(event, "SetManager", log); err != nil {
  1310. return nil, err
  1311. }
  1312. event.Raw = log
  1313. return event, nil
  1314. }