github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/exchange-scrapers/platypusfinance/token/token.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 token 5 6 import ( 7 "math/big" 8 "strings" 9 10 ethereum "github.com/ethereum/go-ethereum" 11 "github.com/ethereum/go-ethereum/accounts/abi" 12 "github.com/ethereum/go-ethereum/accounts/abi/bind" 13 "github.com/ethereum/go-ethereum/common" 14 "github.com/ethereum/go-ethereum/core/types" 15 "github.com/ethereum/go-ethereum/event" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var ( 20 _ = big.NewInt 21 _ = strings.NewReader 22 _ = ethereum.NotFound 23 _ = bind.Bind 24 _ = common.Big1 25 _ = types.BloomLookup 26 _ = event.NewSubscription 27 ) 28 29 // TokenABI is the input ABI used to generate the binding from. 30 const TokenABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"mintingFinished\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initialSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"finishMinting\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"MintFinished\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}]" 31 32 // Token is an auto generated Go binding around an Ethereum contract. 33 type Token struct { 34 TokenCaller // Read-only binding to the contract 35 TokenTransactor // Write-only binding to the contract 36 TokenFilterer // Log filterer for contract events 37 } 38 39 // TokenCaller is an auto generated read-only Go binding around an Ethereum contract. 40 type TokenCaller struct { 41 contract *bind.BoundContract // Generic contract wrapper for the low level calls 42 } 43 44 // TokenTransactor is an auto generated write-only Go binding around an Ethereum contract. 45 type TokenTransactor struct { 46 contract *bind.BoundContract // Generic contract wrapper for the low level calls 47 } 48 49 // TokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 50 type TokenFilterer struct { 51 contract *bind.BoundContract // Generic contract wrapper for the low level calls 52 } 53 54 // TokenSession is an auto generated Go binding around an Ethereum contract, 55 // with pre-set call and transact options. 56 type TokenSession struct { 57 Contract *Token // Generic contract binding to set the session for 58 CallOpts bind.CallOpts // Call options to use throughout this session 59 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 60 } 61 62 // TokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, 63 // with pre-set call options. 64 type TokenCallerSession struct { 65 Contract *TokenCaller // Generic contract caller binding to set the session for 66 CallOpts bind.CallOpts // Call options to use throughout this session 67 } 68 69 // TokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 70 // with pre-set transact options. 71 type TokenTransactorSession struct { 72 Contract *TokenTransactor // Generic contract transactor binding to set the session for 73 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 74 } 75 76 // TokenRaw is an auto generated low-level Go binding around an Ethereum contract. 77 type TokenRaw struct { 78 Contract *Token // Generic contract binding to access the raw methods on 79 } 80 81 // TokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 82 type TokenCallerRaw struct { 83 Contract *TokenCaller // Generic read-only contract binding to access the raw methods on 84 } 85 86 // TokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 87 type TokenTransactorRaw struct { 88 Contract *TokenTransactor // Generic write-only contract binding to access the raw methods on 89 } 90 91 // NewToken creates a new instance of Token, bound to a specific deployed contract. 92 func NewToken(address common.Address, backend bind.ContractBackend) (*Token, error) { 93 contract, err := bindToken(address, backend, backend, backend) 94 if err != nil { 95 return nil, err 96 } 97 return &Token{TokenCaller: TokenCaller{contract: contract}, TokenTransactor: TokenTransactor{contract: contract}, TokenFilterer: TokenFilterer{contract: contract}}, nil 98 } 99 100 // NewTokenCaller creates a new read-only instance of Token, bound to a specific deployed contract. 101 func NewTokenCaller(address common.Address, caller bind.ContractCaller) (*TokenCaller, error) { 102 contract, err := bindToken(address, caller, nil, nil) 103 if err != nil { 104 return nil, err 105 } 106 return &TokenCaller{contract: contract}, nil 107 } 108 109 // NewTokenTransactor creates a new write-only instance of Token, bound to a specific deployed contract. 110 func NewTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*TokenTransactor, error) { 111 contract, err := bindToken(address, nil, transactor, nil) 112 if err != nil { 113 return nil, err 114 } 115 return &TokenTransactor{contract: contract}, nil 116 } 117 118 // NewTokenFilterer creates a new log filterer instance of Token, bound to a specific deployed contract. 119 func NewTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*TokenFilterer, error) { 120 contract, err := bindToken(address, nil, nil, filterer) 121 if err != nil { 122 return nil, err 123 } 124 return &TokenFilterer{contract: contract}, nil 125 } 126 127 // bindToken binds a generic wrapper to an already deployed contract. 128 func bindToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 129 parsed, err := abi.JSON(strings.NewReader(TokenABI)) 130 if err != nil { 131 return nil, err 132 } 133 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 134 } 135 136 // Call invokes the (constant) contract method with params as input values and 137 // sets the output to result. The result type might be a single field for simple 138 // returns, a slice of interfaces for anonymous returns and a struct for named 139 // returns. 140 func (_Token *TokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 141 return _Token.Contract.TokenCaller.contract.Call(opts, result, method, params...) 142 } 143 144 // Transfer initiates a plain transaction to move funds to the contract, calling 145 // its default method if one is available. 146 func (_Token *TokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 147 return _Token.Contract.TokenTransactor.contract.Transfer(opts) 148 } 149 150 // Transact invokes the (paid) contract method with params as input values. 151 func (_Token *TokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 152 return _Token.Contract.TokenTransactor.contract.Transact(opts, method, params...) 153 } 154 155 // Call invokes the (constant) contract method with params as input values and 156 // sets the output to result. The result type might be a single field for simple 157 // returns, a slice of interfaces for anonymous returns and a struct for named 158 // returns. 159 func (_Token *TokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 160 return _Token.Contract.contract.Call(opts, result, method, params...) 161 } 162 163 // Transfer initiates a plain transaction to move funds to the contract, calling 164 // its default method if one is available. 165 func (_Token *TokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 166 return _Token.Contract.contract.Transfer(opts) 167 } 168 169 // Transact invokes the (paid) contract method with params as input values. 170 func (_Token *TokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 171 return _Token.Contract.contract.Transact(opts, method, params...) 172 } 173 174 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 175 // 176 // Solidity: function allowance(address _owner, address _spender) view returns(uint256 remaining) 177 func (_Token *TokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { 178 var out []interface{} 179 err := _Token.contract.Call(opts, &out, "allowance", _owner, _spender) 180 181 if err != nil { 182 return *new(*big.Int), err 183 } 184 185 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 186 187 return out0, err 188 189 } 190 191 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 192 // 193 // Solidity: function allowance(address _owner, address _spender) view returns(uint256 remaining) 194 func (_Token *TokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { 195 return _Token.Contract.Allowance(&_Token.CallOpts, _owner, _spender) 196 } 197 198 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 199 // 200 // Solidity: function allowance(address _owner, address _spender) view returns(uint256 remaining) 201 func (_Token *TokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { 202 return _Token.Contract.Allowance(&_Token.CallOpts, _owner, _spender) 203 } 204 205 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 206 // 207 // Solidity: function balanceOf(address _owner) view returns(uint256 balance) 208 func (_Token *TokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { 209 var out []interface{} 210 err := _Token.contract.Call(opts, &out, "balanceOf", _owner) 211 212 if err != nil { 213 return *new(*big.Int), err 214 } 215 216 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 217 218 return out0, err 219 220 } 221 222 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 223 // 224 // Solidity: function balanceOf(address _owner) view returns(uint256 balance) 225 func (_Token *TokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { 226 return _Token.Contract.BalanceOf(&_Token.CallOpts, _owner) 227 } 228 229 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 230 // 231 // Solidity: function balanceOf(address _owner) view returns(uint256 balance) 232 func (_Token *TokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { 233 return _Token.Contract.BalanceOf(&_Token.CallOpts, _owner) 234 } 235 236 // Decimals is a free data retrieval call binding the contract method 0x313ce567. 237 // 238 // Solidity: function decimals() view returns(uint256) 239 func (_Token *TokenCaller) Decimals(opts *bind.CallOpts) (*big.Int, error) { 240 var out []interface{} 241 err := _Token.contract.Call(opts, &out, "decimals") 242 243 if err != nil { 244 return *new(*big.Int), err 245 } 246 247 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 248 249 return out0, err 250 251 } 252 253 // Decimals is a free data retrieval call binding the contract method 0x313ce567. 254 // 255 // Solidity: function decimals() view returns(uint256) 256 func (_Token *TokenSession) Decimals() (*big.Int, error) { 257 return _Token.Contract.Decimals(&_Token.CallOpts) 258 } 259 260 // Decimals is a free data retrieval call binding the contract method 0x313ce567. 261 // 262 // Solidity: function decimals() view returns(uint256) 263 func (_Token *TokenCallerSession) Decimals() (*big.Int, error) { 264 return _Token.Contract.Decimals(&_Token.CallOpts) 265 } 266 267 // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc. 268 // 269 // Solidity: function initialSupply() view returns(uint256) 270 func (_Token *TokenCaller) InitialSupply(opts *bind.CallOpts) (*big.Int, error) { 271 var out []interface{} 272 err := _Token.contract.Call(opts, &out, "initialSupply") 273 274 if err != nil { 275 return *new(*big.Int), err 276 } 277 278 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 279 280 return out0, err 281 282 } 283 284 // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc. 285 // 286 // Solidity: function initialSupply() view returns(uint256) 287 func (_Token *TokenSession) InitialSupply() (*big.Int, error) { 288 return _Token.Contract.InitialSupply(&_Token.CallOpts) 289 } 290 291 // InitialSupply is a free data retrieval call binding the contract method 0x378dc3dc. 292 // 293 // Solidity: function initialSupply() view returns(uint256) 294 func (_Token *TokenCallerSession) InitialSupply() (*big.Int, error) { 295 return _Token.Contract.InitialSupply(&_Token.CallOpts) 296 } 297 298 // MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. 299 // 300 // Solidity: function mintingFinished() view returns(bool) 301 func (_Token *TokenCaller) MintingFinished(opts *bind.CallOpts) (bool, error) { 302 var out []interface{} 303 err := _Token.contract.Call(opts, &out, "mintingFinished") 304 305 if err != nil { 306 return *new(bool), err 307 } 308 309 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 310 311 return out0, err 312 313 } 314 315 // MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. 316 // 317 // Solidity: function mintingFinished() view returns(bool) 318 func (_Token *TokenSession) MintingFinished() (bool, error) { 319 return _Token.Contract.MintingFinished(&_Token.CallOpts) 320 } 321 322 // MintingFinished is a free data retrieval call binding the contract method 0x05d2035b. 323 // 324 // Solidity: function mintingFinished() view returns(bool) 325 func (_Token *TokenCallerSession) MintingFinished() (bool, error) { 326 return _Token.Contract.MintingFinished(&_Token.CallOpts) 327 } 328 329 // Name is a free data retrieval call binding the contract method 0x06fdde03. 330 // 331 // Solidity: function name() view returns(string) 332 func (_Token *TokenCaller) Name(opts *bind.CallOpts) (string, error) { 333 var out []interface{} 334 err := _Token.contract.Call(opts, &out, "name") 335 336 if err != nil { 337 return *new(string), err 338 } 339 340 out0 := *abi.ConvertType(out[0], new(string)).(*string) 341 342 return out0, err 343 344 } 345 346 // Name is a free data retrieval call binding the contract method 0x06fdde03. 347 // 348 // Solidity: function name() view returns(string) 349 func (_Token *TokenSession) Name() (string, error) { 350 return _Token.Contract.Name(&_Token.CallOpts) 351 } 352 353 // Name is a free data retrieval call binding the contract method 0x06fdde03. 354 // 355 // Solidity: function name() view returns(string) 356 func (_Token *TokenCallerSession) Name() (string, error) { 357 return _Token.Contract.Name(&_Token.CallOpts) 358 } 359 360 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 361 // 362 // Solidity: function owner() view returns(address) 363 func (_Token *TokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { 364 var out []interface{} 365 err := _Token.contract.Call(opts, &out, "owner") 366 367 if err != nil { 368 return *new(common.Address), err 369 } 370 371 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 372 373 return out0, err 374 375 } 376 377 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 378 // 379 // Solidity: function owner() view returns(address) 380 func (_Token *TokenSession) Owner() (common.Address, error) { 381 return _Token.Contract.Owner(&_Token.CallOpts) 382 } 383 384 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 385 // 386 // Solidity: function owner() view returns(address) 387 func (_Token *TokenCallerSession) Owner() (common.Address, error) { 388 return _Token.Contract.Owner(&_Token.CallOpts) 389 } 390 391 // Symbol is a free data retrieval call binding the contract method 0x95d89b41. 392 // 393 // Solidity: function symbol() view returns(string) 394 func (_Token *TokenCaller) Symbol(opts *bind.CallOpts) (string, error) { 395 var out []interface{} 396 err := _Token.contract.Call(opts, &out, "symbol") 397 398 if err != nil { 399 return *new(string), err 400 } 401 402 out0 := *abi.ConvertType(out[0], new(string)).(*string) 403 404 return out0, err 405 406 } 407 408 // Symbol is a free data retrieval call binding the contract method 0x95d89b41. 409 // 410 // Solidity: function symbol() view returns(string) 411 func (_Token *TokenSession) Symbol() (string, error) { 412 return _Token.Contract.Symbol(&_Token.CallOpts) 413 } 414 415 // Symbol is a free data retrieval call binding the contract method 0x95d89b41. 416 // 417 // Solidity: function symbol() view returns(string) 418 func (_Token *TokenCallerSession) Symbol() (string, error) { 419 return _Token.Contract.Symbol(&_Token.CallOpts) 420 } 421 422 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 423 // 424 // Solidity: function totalSupply() view returns(uint256) 425 func (_Token *TokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 426 var out []interface{} 427 err := _Token.contract.Call(opts, &out, "totalSupply") 428 429 if err != nil { 430 return *new(*big.Int), err 431 } 432 433 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 434 435 return out0, err 436 437 } 438 439 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 440 // 441 // Solidity: function totalSupply() view returns(uint256) 442 func (_Token *TokenSession) TotalSupply() (*big.Int, error) { 443 return _Token.Contract.TotalSupply(&_Token.CallOpts) 444 } 445 446 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 447 // 448 // Solidity: function totalSupply() view returns(uint256) 449 func (_Token *TokenCallerSession) TotalSupply() (*big.Int, error) { 450 return _Token.Contract.TotalSupply(&_Token.CallOpts) 451 } 452 453 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 454 // 455 // Solidity: function approve(address _spender, uint256 _value) returns(bool) 456 func (_Token *TokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { 457 return _Token.contract.Transact(opts, "approve", _spender, _value) 458 } 459 460 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 461 // 462 // Solidity: function approve(address _spender, uint256 _value) returns(bool) 463 func (_Token *TokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { 464 return _Token.Contract.Approve(&_Token.TransactOpts, _spender, _value) 465 } 466 467 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 468 // 469 // Solidity: function approve(address _spender, uint256 _value) returns(bool) 470 func (_Token *TokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { 471 return _Token.Contract.Approve(&_Token.TransactOpts, _spender, _value) 472 } 473 474 // FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. 475 // 476 // Solidity: function finishMinting() returns(bool) 477 func (_Token *TokenTransactor) FinishMinting(opts *bind.TransactOpts) (*types.Transaction, error) { 478 return _Token.contract.Transact(opts, "finishMinting") 479 } 480 481 // FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. 482 // 483 // Solidity: function finishMinting() returns(bool) 484 func (_Token *TokenSession) FinishMinting() (*types.Transaction, error) { 485 return _Token.Contract.FinishMinting(&_Token.TransactOpts) 486 } 487 488 // FinishMinting is a paid mutator transaction binding the contract method 0x7d64bcb4. 489 // 490 // Solidity: function finishMinting() returns(bool) 491 func (_Token *TokenTransactorSession) FinishMinting() (*types.Transaction, error) { 492 return _Token.Contract.FinishMinting(&_Token.TransactOpts) 493 } 494 495 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 496 // 497 // Solidity: function mint(address _to, uint256 _amount) returns(bool) 498 func (_Token *TokenTransactor) Mint(opts *bind.TransactOpts, _to common.Address, _amount *big.Int) (*types.Transaction, error) { 499 return _Token.contract.Transact(opts, "mint", _to, _amount) 500 } 501 502 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 503 // 504 // Solidity: function mint(address _to, uint256 _amount) returns(bool) 505 func (_Token *TokenSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { 506 return _Token.Contract.Mint(&_Token.TransactOpts, _to, _amount) 507 } 508 509 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 510 // 511 // Solidity: function mint(address _to, uint256 _amount) returns(bool) 512 func (_Token *TokenTransactorSession) Mint(_to common.Address, _amount *big.Int) (*types.Transaction, error) { 513 return _Token.Contract.Mint(&_Token.TransactOpts, _to, _amount) 514 } 515 516 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 517 // 518 // Solidity: function transfer(address _to, uint256 _value) returns(bool) 519 func (_Token *TokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { 520 return _Token.contract.Transact(opts, "transfer", _to, _value) 521 } 522 523 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 524 // 525 // Solidity: function transfer(address _to, uint256 _value) returns(bool) 526 func (_Token *TokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { 527 return _Token.Contract.Transfer(&_Token.TransactOpts, _to, _value) 528 } 529 530 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 531 // 532 // Solidity: function transfer(address _to, uint256 _value) returns(bool) 533 func (_Token *TokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { 534 return _Token.Contract.Transfer(&_Token.TransactOpts, _to, _value) 535 } 536 537 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 538 // 539 // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) 540 func (_Token *TokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { 541 return _Token.contract.Transact(opts, "transferFrom", _from, _to, _value) 542 } 543 544 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 545 // 546 // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) 547 func (_Token *TokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { 548 return _Token.Contract.TransferFrom(&_Token.TransactOpts, _from, _to, _value) 549 } 550 551 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 552 // 553 // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) 554 func (_Token *TokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { 555 return _Token.Contract.TransferFrom(&_Token.TransactOpts, _from, _to, _value) 556 } 557 558 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 559 // 560 // Solidity: function transferOwnership(address newOwner) returns() 561 func (_Token *TokenTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { 562 return _Token.contract.Transact(opts, "transferOwnership", newOwner) 563 } 564 565 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 566 // 567 // Solidity: function transferOwnership(address newOwner) returns() 568 func (_Token *TokenSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 569 return _Token.Contract.TransferOwnership(&_Token.TransactOpts, newOwner) 570 } 571 572 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 573 // 574 // Solidity: function transferOwnership(address newOwner) returns() 575 func (_Token *TokenTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 576 return _Token.Contract.TransferOwnership(&_Token.TransactOpts, newOwner) 577 } 578 579 // TokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Token contract. 580 type TokenApprovalIterator struct { 581 Event *TokenApproval // Event containing the contract specifics and raw log 582 583 contract *bind.BoundContract // Generic contract to use for unpacking event data 584 event string // Event name to use for unpacking event data 585 586 logs chan types.Log // Log channel receiving the found contract events 587 sub ethereum.Subscription // Subscription for errors, completion and termination 588 done bool // Whether the subscription completed delivering logs 589 fail error // Occurred error to stop iteration 590 } 591 592 // Next advances the iterator to the subsequent event, returning whether there 593 // are any more events found. In case of a retrieval or parsing error, false is 594 // returned and Error() can be queried for the exact failure. 595 func (it *TokenApprovalIterator) Next() bool { 596 // If the iterator failed, stop iterating 597 if it.fail != nil { 598 return false 599 } 600 // If the iterator completed, deliver directly whatever's available 601 if it.done { 602 select { 603 case log := <-it.logs: 604 it.Event = new(TokenApproval) 605 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 606 it.fail = err 607 return false 608 } 609 it.Event.Raw = log 610 return true 611 612 default: 613 return false 614 } 615 } 616 // Iterator still in progress, wait for either a data or an error event 617 select { 618 case log := <-it.logs: 619 it.Event = new(TokenApproval) 620 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 621 it.fail = err 622 return false 623 } 624 it.Event.Raw = log 625 return true 626 627 case err := <-it.sub.Err(): 628 it.done = true 629 it.fail = err 630 return it.Next() 631 } 632 } 633 634 // Error returns any retrieval or parsing error occurred during filtering. 635 func (it *TokenApprovalIterator) Error() error { 636 return it.fail 637 } 638 639 // Close terminates the iteration process, releasing any pending underlying 640 // resources. 641 func (it *TokenApprovalIterator) Close() error { 642 it.sub.Unsubscribe() 643 return nil 644 } 645 646 // TokenApproval represents a Approval event raised by the Token contract. 647 type TokenApproval struct { 648 Owner common.Address 649 Spender common.Address 650 Value *big.Int 651 Raw types.Log // Blockchain specific contextual infos 652 } 653 654 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 655 // 656 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 657 func (_Token *TokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*TokenApprovalIterator, error) { 658 659 var ownerRule []interface{} 660 for _, ownerItem := range owner { 661 ownerRule = append(ownerRule, ownerItem) 662 } 663 var spenderRule []interface{} 664 for _, spenderItem := range spender { 665 spenderRule = append(spenderRule, spenderItem) 666 } 667 668 logs, sub, err := _Token.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 669 if err != nil { 670 return nil, err 671 } 672 return &TokenApprovalIterator{contract: _Token.contract, event: "Approval", logs: logs, sub: sub}, nil 673 } 674 675 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 676 // 677 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 678 func (_Token *TokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *TokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 679 680 var ownerRule []interface{} 681 for _, ownerItem := range owner { 682 ownerRule = append(ownerRule, ownerItem) 683 } 684 var spenderRule []interface{} 685 for _, spenderItem := range spender { 686 spenderRule = append(spenderRule, spenderItem) 687 } 688 689 logs, sub, err := _Token.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 690 if err != nil { 691 return nil, err 692 } 693 return event.NewSubscription(func(quit <-chan struct{}) error { 694 defer sub.Unsubscribe() 695 for { 696 select { 697 case log := <-logs: 698 // New log arrived, parse the event and forward to the user 699 event := new(TokenApproval) 700 if err := _Token.contract.UnpackLog(event, "Approval", log); err != nil { 701 return err 702 } 703 event.Raw = log 704 705 select { 706 case sink <- event: 707 case err := <-sub.Err(): 708 return err 709 case <-quit: 710 return nil 711 } 712 case err := <-sub.Err(): 713 return err 714 case <-quit: 715 return nil 716 } 717 } 718 }), nil 719 } 720 721 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 722 // 723 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 724 func (_Token *TokenFilterer) ParseApproval(log types.Log) (*TokenApproval, error) { 725 event := new(TokenApproval) 726 if err := _Token.contract.UnpackLog(event, "Approval", log); err != nil { 727 return nil, err 728 } 729 event.Raw = log 730 return event, nil 731 } 732 733 // TokenMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the Token contract. 734 type TokenMintIterator struct { 735 Event *TokenMint // Event containing the contract specifics and raw log 736 737 contract *bind.BoundContract // Generic contract to use for unpacking event data 738 event string // Event name to use for unpacking event data 739 740 logs chan types.Log // Log channel receiving the found contract events 741 sub ethereum.Subscription // Subscription for errors, completion and termination 742 done bool // Whether the subscription completed delivering logs 743 fail error // Occurred error to stop iteration 744 } 745 746 // Next advances the iterator to the subsequent event, returning whether there 747 // are any more events found. In case of a retrieval or parsing error, false is 748 // returned and Error() can be queried for the exact failure. 749 func (it *TokenMintIterator) Next() bool { 750 // If the iterator failed, stop iterating 751 if it.fail != nil { 752 return false 753 } 754 // If the iterator completed, deliver directly whatever's available 755 if it.done { 756 select { 757 case log := <-it.logs: 758 it.Event = new(TokenMint) 759 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 760 it.fail = err 761 return false 762 } 763 it.Event.Raw = log 764 return true 765 766 default: 767 return false 768 } 769 } 770 // Iterator still in progress, wait for either a data or an error event 771 select { 772 case log := <-it.logs: 773 it.Event = new(TokenMint) 774 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 775 it.fail = err 776 return false 777 } 778 it.Event.Raw = log 779 return true 780 781 case err := <-it.sub.Err(): 782 it.done = true 783 it.fail = err 784 return it.Next() 785 } 786 } 787 788 // Error returns any retrieval or parsing error occurred during filtering. 789 func (it *TokenMintIterator) Error() error { 790 return it.fail 791 } 792 793 // Close terminates the iteration process, releasing any pending underlying 794 // resources. 795 func (it *TokenMintIterator) Close() error { 796 it.sub.Unsubscribe() 797 return nil 798 } 799 800 // TokenMint represents a Mint event raised by the Token contract. 801 type TokenMint struct { 802 To common.Address 803 Amount *big.Int 804 Raw types.Log // Blockchain specific contextual infos 805 } 806 807 // FilterMint is a free log retrieval operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. 808 // 809 // Solidity: event Mint(address indexed to, uint256 amount) 810 func (_Token *TokenFilterer) FilterMint(opts *bind.FilterOpts, to []common.Address) (*TokenMintIterator, error) { 811 812 var toRule []interface{} 813 for _, toItem := range to { 814 toRule = append(toRule, toItem) 815 } 816 817 logs, sub, err := _Token.contract.FilterLogs(opts, "Mint", toRule) 818 if err != nil { 819 return nil, err 820 } 821 return &TokenMintIterator{contract: _Token.contract, event: "Mint", logs: logs, sub: sub}, nil 822 } 823 824 // WatchMint is a free log subscription operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. 825 // 826 // Solidity: event Mint(address indexed to, uint256 amount) 827 func (_Token *TokenFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *TokenMint, to []common.Address) (event.Subscription, error) { 828 829 var toRule []interface{} 830 for _, toItem := range to { 831 toRule = append(toRule, toItem) 832 } 833 834 logs, sub, err := _Token.contract.WatchLogs(opts, "Mint", toRule) 835 if err != nil { 836 return nil, err 837 } 838 return event.NewSubscription(func(quit <-chan struct{}) error { 839 defer sub.Unsubscribe() 840 for { 841 select { 842 case log := <-logs: 843 // New log arrived, parse the event and forward to the user 844 event := new(TokenMint) 845 if err := _Token.contract.UnpackLog(event, "Mint", log); err != nil { 846 return err 847 } 848 event.Raw = log 849 850 select { 851 case sink <- event: 852 case err := <-sub.Err(): 853 return err 854 case <-quit: 855 return nil 856 } 857 case err := <-sub.Err(): 858 return err 859 case <-quit: 860 return nil 861 } 862 } 863 }), nil 864 } 865 866 // ParseMint is a log parse operation binding the contract event 0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885. 867 // 868 // Solidity: event Mint(address indexed to, uint256 amount) 869 func (_Token *TokenFilterer) ParseMint(log types.Log) (*TokenMint, error) { 870 event := new(TokenMint) 871 if err := _Token.contract.UnpackLog(event, "Mint", log); err != nil { 872 return nil, err 873 } 874 event.Raw = log 875 return event, nil 876 } 877 878 // TokenMintFinishedIterator is returned from FilterMintFinished and is used to iterate over the raw logs and unpacked data for MintFinished events raised by the Token contract. 879 type TokenMintFinishedIterator struct { 880 Event *TokenMintFinished // Event containing the contract specifics and raw log 881 882 contract *bind.BoundContract // Generic contract to use for unpacking event data 883 event string // Event name to use for unpacking event data 884 885 logs chan types.Log // Log channel receiving the found contract events 886 sub ethereum.Subscription // Subscription for errors, completion and termination 887 done bool // Whether the subscription completed delivering logs 888 fail error // Occurred error to stop iteration 889 } 890 891 // Next advances the iterator to the subsequent event, returning whether there 892 // are any more events found. In case of a retrieval or parsing error, false is 893 // returned and Error() can be queried for the exact failure. 894 func (it *TokenMintFinishedIterator) Next() bool { 895 // If the iterator failed, stop iterating 896 if it.fail != nil { 897 return false 898 } 899 // If the iterator completed, deliver directly whatever's available 900 if it.done { 901 select { 902 case log := <-it.logs: 903 it.Event = new(TokenMintFinished) 904 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 905 it.fail = err 906 return false 907 } 908 it.Event.Raw = log 909 return true 910 911 default: 912 return false 913 } 914 } 915 // Iterator still in progress, wait for either a data or an error event 916 select { 917 case log := <-it.logs: 918 it.Event = new(TokenMintFinished) 919 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 920 it.fail = err 921 return false 922 } 923 it.Event.Raw = log 924 return true 925 926 case err := <-it.sub.Err(): 927 it.done = true 928 it.fail = err 929 return it.Next() 930 } 931 } 932 933 // Error returns any retrieval or parsing error occurred during filtering. 934 func (it *TokenMintFinishedIterator) Error() error { 935 return it.fail 936 } 937 938 // Close terminates the iteration process, releasing any pending underlying 939 // resources. 940 func (it *TokenMintFinishedIterator) Close() error { 941 it.sub.Unsubscribe() 942 return nil 943 } 944 945 // TokenMintFinished represents a MintFinished event raised by the Token contract. 946 type TokenMintFinished struct { 947 Raw types.Log // Blockchain specific contextual infos 948 } 949 950 // FilterMintFinished is a free log retrieval operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. 951 // 952 // Solidity: event MintFinished() 953 func (_Token *TokenFilterer) FilterMintFinished(opts *bind.FilterOpts) (*TokenMintFinishedIterator, error) { 954 955 logs, sub, err := _Token.contract.FilterLogs(opts, "MintFinished") 956 if err != nil { 957 return nil, err 958 } 959 return &TokenMintFinishedIterator{contract: _Token.contract, event: "MintFinished", logs: logs, sub: sub}, nil 960 } 961 962 // WatchMintFinished is a free log subscription operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. 963 // 964 // Solidity: event MintFinished() 965 func (_Token *TokenFilterer) WatchMintFinished(opts *bind.WatchOpts, sink chan<- *TokenMintFinished) (event.Subscription, error) { 966 967 logs, sub, err := _Token.contract.WatchLogs(opts, "MintFinished") 968 if err != nil { 969 return nil, err 970 } 971 return event.NewSubscription(func(quit <-chan struct{}) error { 972 defer sub.Unsubscribe() 973 for { 974 select { 975 case log := <-logs: 976 // New log arrived, parse the event and forward to the user 977 event := new(TokenMintFinished) 978 if err := _Token.contract.UnpackLog(event, "MintFinished", log); err != nil { 979 return err 980 } 981 event.Raw = log 982 983 select { 984 case sink <- event: 985 case err := <-sub.Err(): 986 return err 987 case <-quit: 988 return nil 989 } 990 case err := <-sub.Err(): 991 return err 992 case <-quit: 993 return nil 994 } 995 } 996 }), nil 997 } 998 999 // ParseMintFinished is a log parse operation binding the contract event 0xae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa08. 1000 // 1001 // Solidity: event MintFinished() 1002 func (_Token *TokenFilterer) ParseMintFinished(log types.Log) (*TokenMintFinished, error) { 1003 event := new(TokenMintFinished) 1004 if err := _Token.contract.UnpackLog(event, "MintFinished", log); err != nil { 1005 return nil, err 1006 } 1007 event.Raw = log 1008 return event, nil 1009 } 1010 1011 // TokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Token contract. 1012 type TokenTransferIterator struct { 1013 Event *TokenTransfer // Event containing the contract specifics and raw log 1014 1015 contract *bind.BoundContract // Generic contract to use for unpacking event data 1016 event string // Event name to use for unpacking event data 1017 1018 logs chan types.Log // Log channel receiving the found contract events 1019 sub ethereum.Subscription // Subscription for errors, completion and termination 1020 done bool // Whether the subscription completed delivering logs 1021 fail error // Occurred error to stop iteration 1022 } 1023 1024 // Next advances the iterator to the subsequent event, returning whether there 1025 // are any more events found. In case of a retrieval or parsing error, false is 1026 // returned and Error() can be queried for the exact failure. 1027 func (it *TokenTransferIterator) Next() bool { 1028 // If the iterator failed, stop iterating 1029 if it.fail != nil { 1030 return false 1031 } 1032 // If the iterator completed, deliver directly whatever's available 1033 if it.done { 1034 select { 1035 case log := <-it.logs: 1036 it.Event = new(TokenTransfer) 1037 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1038 it.fail = err 1039 return false 1040 } 1041 it.Event.Raw = log 1042 return true 1043 1044 default: 1045 return false 1046 } 1047 } 1048 // Iterator still in progress, wait for either a data or an error event 1049 select { 1050 case log := <-it.logs: 1051 it.Event = new(TokenTransfer) 1052 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1053 it.fail = err 1054 return false 1055 } 1056 it.Event.Raw = log 1057 return true 1058 1059 case err := <-it.sub.Err(): 1060 it.done = true 1061 it.fail = err 1062 return it.Next() 1063 } 1064 } 1065 1066 // Error returns any retrieval or parsing error occurred during filtering. 1067 func (it *TokenTransferIterator) Error() error { 1068 return it.fail 1069 } 1070 1071 // Close terminates the iteration process, releasing any pending underlying 1072 // resources. 1073 func (it *TokenTransferIterator) Close() error { 1074 it.sub.Unsubscribe() 1075 return nil 1076 } 1077 1078 // TokenTransfer represents a Transfer event raised by the Token contract. 1079 type TokenTransfer struct { 1080 From common.Address 1081 To common.Address 1082 Value *big.Int 1083 Raw types.Log // Blockchain specific contextual infos 1084 } 1085 1086 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1087 // 1088 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1089 func (_Token *TokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*TokenTransferIterator, error) { 1090 1091 var fromRule []interface{} 1092 for _, fromItem := range from { 1093 fromRule = append(fromRule, fromItem) 1094 } 1095 var toRule []interface{} 1096 for _, toItem := range to { 1097 toRule = append(toRule, toItem) 1098 } 1099 1100 logs, sub, err := _Token.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 1101 if err != nil { 1102 return nil, err 1103 } 1104 return &TokenTransferIterator{contract: _Token.contract, event: "Transfer", logs: logs, sub: sub}, nil 1105 } 1106 1107 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1108 // 1109 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1110 func (_Token *TokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *TokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 1111 1112 var fromRule []interface{} 1113 for _, fromItem := range from { 1114 fromRule = append(fromRule, fromItem) 1115 } 1116 var toRule []interface{} 1117 for _, toItem := range to { 1118 toRule = append(toRule, toItem) 1119 } 1120 1121 logs, sub, err := _Token.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 1122 if err != nil { 1123 return nil, err 1124 } 1125 return event.NewSubscription(func(quit <-chan struct{}) error { 1126 defer sub.Unsubscribe() 1127 for { 1128 select { 1129 case log := <-logs: 1130 // New log arrived, parse the event and forward to the user 1131 event := new(TokenTransfer) 1132 if err := _Token.contract.UnpackLog(event, "Transfer", log); err != nil { 1133 return err 1134 } 1135 event.Raw = log 1136 1137 select { 1138 case sink <- event: 1139 case err := <-sub.Err(): 1140 return err 1141 case <-quit: 1142 return nil 1143 } 1144 case err := <-sub.Err(): 1145 return err 1146 case <-quit: 1147 return nil 1148 } 1149 } 1150 }), nil 1151 } 1152 1153 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1154 // 1155 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1156 func (_Token *TokenFilterer) ParseTransfer(log types.Log) (*TokenTransfer, error) { 1157 event := new(TokenTransfer) 1158 if err := _Token.contract.UnpackLog(event, "Transfer", log); err != nil { 1159 return nil, err 1160 } 1161 event.Raw = log 1162 return event, nil 1163 }