github.com/codingfuture/orig-energi3@v0.8.4/energi/abi/IMasternodeToken.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 abi 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 _ = abi.U256 24 _ = bind.Bind 25 _ = common.Big1 26 _ = types.BloomLookup 27 _ = event.NewSubscription 28 ) 29 30 // IMasternodeTokenABI is the input ABI used to generate the binding from. 31 const IMasternodeTokenABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenOwner\",\"type\":\"address\"}],\"name\":\"balanceInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last_block\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"depositCollateral\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawCollateral\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 32 33 // IMasternodeToken is an auto generated Go binding around an Ethereum contract. 34 type IMasternodeToken struct { 35 IMasternodeTokenCaller // Read-only binding to the contract 36 IMasternodeTokenTransactor // Write-only binding to the contract 37 IMasternodeTokenFilterer // Log filterer for contract events 38 } 39 40 // IMasternodeTokenCaller is an auto generated read-only Go binding around an Ethereum contract. 41 type IMasternodeTokenCaller struct { 42 contract *bind.BoundContract // Generic contract wrapper for the low level calls 43 } 44 45 // IMasternodeTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. 46 type IMasternodeTokenTransactor struct { 47 contract *bind.BoundContract // Generic contract wrapper for the low level calls 48 } 49 50 // IMasternodeTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 51 type IMasternodeTokenFilterer struct { 52 contract *bind.BoundContract // Generic contract wrapper for the low level calls 53 } 54 55 // IMasternodeTokenSession is an auto generated Go binding around an Ethereum contract, 56 // with pre-set call and transact options. 57 type IMasternodeTokenSession struct { 58 Contract *IMasternodeToken // Generic contract binding to set the session for 59 CallOpts bind.CallOpts // Call options to use throughout this session 60 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 61 } 62 63 // IMasternodeTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, 64 // with pre-set call options. 65 type IMasternodeTokenCallerSession struct { 66 Contract *IMasternodeTokenCaller // Generic contract caller binding to set the session for 67 CallOpts bind.CallOpts // Call options to use throughout this session 68 } 69 70 // IMasternodeTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 71 // with pre-set transact options. 72 type IMasternodeTokenTransactorSession struct { 73 Contract *IMasternodeTokenTransactor // Generic contract transactor binding to set the session for 74 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 75 } 76 77 // IMasternodeTokenRaw is an auto generated low-level Go binding around an Ethereum contract. 78 type IMasternodeTokenRaw struct { 79 Contract *IMasternodeToken // Generic contract binding to access the raw methods on 80 } 81 82 // IMasternodeTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 83 type IMasternodeTokenCallerRaw struct { 84 Contract *IMasternodeTokenCaller // Generic read-only contract binding to access the raw methods on 85 } 86 87 // IMasternodeTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 88 type IMasternodeTokenTransactorRaw struct { 89 Contract *IMasternodeTokenTransactor // Generic write-only contract binding to access the raw methods on 90 } 91 92 // NewIMasternodeToken creates a new instance of IMasternodeToken, bound to a specific deployed contract. 93 func NewIMasternodeToken(address common.Address, backend bind.ContractBackend) (*IMasternodeToken, error) { 94 contract, err := bindIMasternodeToken(address, backend, backend, backend) 95 if err != nil { 96 return nil, err 97 } 98 return &IMasternodeToken{IMasternodeTokenCaller: IMasternodeTokenCaller{contract: contract}, IMasternodeTokenTransactor: IMasternodeTokenTransactor{contract: contract}, IMasternodeTokenFilterer: IMasternodeTokenFilterer{contract: contract}}, nil 99 } 100 101 // NewIMasternodeTokenCaller creates a new read-only instance of IMasternodeToken, bound to a specific deployed contract. 102 func NewIMasternodeTokenCaller(address common.Address, caller bind.ContractCaller) (*IMasternodeTokenCaller, error) { 103 contract, err := bindIMasternodeToken(address, caller, nil, nil) 104 if err != nil { 105 return nil, err 106 } 107 return &IMasternodeTokenCaller{contract: contract}, nil 108 } 109 110 // NewIMasternodeTokenTransactor creates a new write-only instance of IMasternodeToken, bound to a specific deployed contract. 111 func NewIMasternodeTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*IMasternodeTokenTransactor, error) { 112 contract, err := bindIMasternodeToken(address, nil, transactor, nil) 113 if err != nil { 114 return nil, err 115 } 116 return &IMasternodeTokenTransactor{contract: contract}, nil 117 } 118 119 // NewIMasternodeTokenFilterer creates a new log filterer instance of IMasternodeToken, bound to a specific deployed contract. 120 func NewIMasternodeTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*IMasternodeTokenFilterer, error) { 121 contract, err := bindIMasternodeToken(address, nil, nil, filterer) 122 if err != nil { 123 return nil, err 124 } 125 return &IMasternodeTokenFilterer{contract: contract}, nil 126 } 127 128 // bindIMasternodeToken binds a generic wrapper to an already deployed contract. 129 func bindIMasternodeToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 130 parsed, err := abi.JSON(strings.NewReader(IMasternodeTokenABI)) 131 if err != nil { 132 return nil, err 133 } 134 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 135 } 136 137 // Call invokes the (constant) contract method with params as input values and 138 // sets the output to result. The result type might be a single field for simple 139 // returns, a slice of interfaces for anonymous returns and a struct for named 140 // returns. 141 func (_IMasternodeToken *IMasternodeTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 142 return _IMasternodeToken.Contract.IMasternodeTokenCaller.contract.Call(opts, result, method, params...) 143 } 144 145 // Transfer initiates a plain transaction to move funds to the contract, calling 146 // its default method if one is available. 147 func (_IMasternodeToken *IMasternodeTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 148 return _IMasternodeToken.Contract.IMasternodeTokenTransactor.contract.Transfer(opts) 149 } 150 151 // Transact invokes the (paid) contract method with params as input values. 152 func (_IMasternodeToken *IMasternodeTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 153 return _IMasternodeToken.Contract.IMasternodeTokenTransactor.contract.Transact(opts, method, params...) 154 } 155 156 // Call invokes the (constant) contract method with params as input values and 157 // sets the output to result. The result type might be a single field for simple 158 // returns, a slice of interfaces for anonymous returns and a struct for named 159 // returns. 160 func (_IMasternodeToken *IMasternodeTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 161 return _IMasternodeToken.Contract.contract.Call(opts, result, method, params...) 162 } 163 164 // Transfer initiates a plain transaction to move funds to the contract, calling 165 // its default method if one is available. 166 func (_IMasternodeToken *IMasternodeTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 167 return _IMasternodeToken.Contract.contract.Transfer(opts) 168 } 169 170 // Transact invokes the (paid) contract method with params as input values. 171 func (_IMasternodeToken *IMasternodeTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 172 return _IMasternodeToken.Contract.contract.Transact(opts, method, params...) 173 } 174 175 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 176 // 177 // Solidity: function allowance(address _owner, address _spender) constant returns(uint256 remaining) 178 func (_IMasternodeToken *IMasternodeTokenCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { 179 var ( 180 ret0 = new(*big.Int) 181 ) 182 out := ret0 183 err := _IMasternodeToken.contract.Call(opts, out, "allowance", _owner, _spender) 184 return *ret0, err 185 } 186 187 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 188 // 189 // Solidity: function allowance(address _owner, address _spender) constant returns(uint256 remaining) 190 func (_IMasternodeToken *IMasternodeTokenSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { 191 return _IMasternodeToken.Contract.Allowance(&_IMasternodeToken.CallOpts, _owner, _spender) 192 } 193 194 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 195 // 196 // Solidity: function allowance(address _owner, address _spender) constant returns(uint256 remaining) 197 func (_IMasternodeToken *IMasternodeTokenCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { 198 return _IMasternodeToken.Contract.Allowance(&_IMasternodeToken.CallOpts, _owner, _spender) 199 } 200 201 // BalanceInfo is a free data retrieval call binding the contract method 0x78c7d979. 202 // 203 // Solidity: function balanceInfo(address _tokenOwner) constant returns(uint256 balance, uint256 last_block) 204 func (_IMasternodeToken *IMasternodeTokenCaller) BalanceInfo(opts *bind.CallOpts, _tokenOwner common.Address) (struct { 205 Balance *big.Int 206 LastBlock *big.Int 207 }, error) { 208 ret := new(struct { 209 Balance *big.Int 210 LastBlock *big.Int 211 }) 212 out := ret 213 err := _IMasternodeToken.contract.Call(opts, out, "balanceInfo", _tokenOwner) 214 return *ret, err 215 } 216 217 // BalanceInfo is a free data retrieval call binding the contract method 0x78c7d979. 218 // 219 // Solidity: function balanceInfo(address _tokenOwner) constant returns(uint256 balance, uint256 last_block) 220 func (_IMasternodeToken *IMasternodeTokenSession) BalanceInfo(_tokenOwner common.Address) (struct { 221 Balance *big.Int 222 LastBlock *big.Int 223 }, error) { 224 return _IMasternodeToken.Contract.BalanceInfo(&_IMasternodeToken.CallOpts, _tokenOwner) 225 } 226 227 // BalanceInfo is a free data retrieval call binding the contract method 0x78c7d979. 228 // 229 // Solidity: function balanceInfo(address _tokenOwner) constant returns(uint256 balance, uint256 last_block) 230 func (_IMasternodeToken *IMasternodeTokenCallerSession) BalanceInfo(_tokenOwner common.Address) (struct { 231 Balance *big.Int 232 LastBlock *big.Int 233 }, error) { 234 return _IMasternodeToken.Contract.BalanceInfo(&_IMasternodeToken.CallOpts, _tokenOwner) 235 } 236 237 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 238 // 239 // Solidity: function balanceOf(address _owner) constant returns(uint256 balance) 240 func (_IMasternodeToken *IMasternodeTokenCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { 241 var ( 242 ret0 = new(*big.Int) 243 ) 244 out := ret0 245 err := _IMasternodeToken.contract.Call(opts, out, "balanceOf", _owner) 246 return *ret0, err 247 } 248 249 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 250 // 251 // Solidity: function balanceOf(address _owner) constant returns(uint256 balance) 252 func (_IMasternodeToken *IMasternodeTokenSession) BalanceOf(_owner common.Address) (*big.Int, error) { 253 return _IMasternodeToken.Contract.BalanceOf(&_IMasternodeToken.CallOpts, _owner) 254 } 255 256 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 257 // 258 // Solidity: function balanceOf(address _owner) constant returns(uint256 balance) 259 func (_IMasternodeToken *IMasternodeTokenCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { 260 return _IMasternodeToken.Contract.BalanceOf(&_IMasternodeToken.CallOpts, _owner) 261 } 262 263 // Decimals is a free data retrieval call binding the contract method 0x313ce567. 264 // 265 // Solidity: function decimals() constant returns(uint8) 266 func (_IMasternodeToken *IMasternodeTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { 267 var ( 268 ret0 = new(uint8) 269 ) 270 out := ret0 271 err := _IMasternodeToken.contract.Call(opts, out, "decimals") 272 return *ret0, err 273 } 274 275 // Decimals is a free data retrieval call binding the contract method 0x313ce567. 276 // 277 // Solidity: function decimals() constant returns(uint8) 278 func (_IMasternodeToken *IMasternodeTokenSession) Decimals() (uint8, error) { 279 return _IMasternodeToken.Contract.Decimals(&_IMasternodeToken.CallOpts) 280 } 281 282 // Decimals is a free data retrieval call binding the contract method 0x313ce567. 283 // 284 // Solidity: function decimals() constant returns(uint8) 285 func (_IMasternodeToken *IMasternodeTokenCallerSession) Decimals() (uint8, error) { 286 return _IMasternodeToken.Contract.Decimals(&_IMasternodeToken.CallOpts) 287 } 288 289 // Name is a free data retrieval call binding the contract method 0x06fdde03. 290 // 291 // Solidity: function name() constant returns(string) 292 func (_IMasternodeToken *IMasternodeTokenCaller) Name(opts *bind.CallOpts) (string, error) { 293 var ( 294 ret0 = new(string) 295 ) 296 out := ret0 297 err := _IMasternodeToken.contract.Call(opts, out, "name") 298 return *ret0, err 299 } 300 301 // Name is a free data retrieval call binding the contract method 0x06fdde03. 302 // 303 // Solidity: function name() constant returns(string) 304 func (_IMasternodeToken *IMasternodeTokenSession) Name() (string, error) { 305 return _IMasternodeToken.Contract.Name(&_IMasternodeToken.CallOpts) 306 } 307 308 // Name is a free data retrieval call binding the contract method 0x06fdde03. 309 // 310 // Solidity: function name() constant returns(string) 311 func (_IMasternodeToken *IMasternodeTokenCallerSession) Name() (string, error) { 312 return _IMasternodeToken.Contract.Name(&_IMasternodeToken.CallOpts) 313 } 314 315 // Symbol is a free data retrieval call binding the contract method 0x95d89b41. 316 // 317 // Solidity: function symbol() constant returns(string) 318 func (_IMasternodeToken *IMasternodeTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { 319 var ( 320 ret0 = new(string) 321 ) 322 out := ret0 323 err := _IMasternodeToken.contract.Call(opts, out, "symbol") 324 return *ret0, err 325 } 326 327 // Symbol is a free data retrieval call binding the contract method 0x95d89b41. 328 // 329 // Solidity: function symbol() constant returns(string) 330 func (_IMasternodeToken *IMasternodeTokenSession) Symbol() (string, error) { 331 return _IMasternodeToken.Contract.Symbol(&_IMasternodeToken.CallOpts) 332 } 333 334 // Symbol is a free data retrieval call binding the contract method 0x95d89b41. 335 // 336 // Solidity: function symbol() constant returns(string) 337 func (_IMasternodeToken *IMasternodeTokenCallerSession) Symbol() (string, error) { 338 return _IMasternodeToken.Contract.Symbol(&_IMasternodeToken.CallOpts) 339 } 340 341 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 342 // 343 // Solidity: function totalSupply() constant returns(uint256) 344 func (_IMasternodeToken *IMasternodeTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 345 var ( 346 ret0 = new(*big.Int) 347 ) 348 out := ret0 349 err := _IMasternodeToken.contract.Call(opts, out, "totalSupply") 350 return *ret0, err 351 } 352 353 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 354 // 355 // Solidity: function totalSupply() constant returns(uint256) 356 func (_IMasternodeToken *IMasternodeTokenSession) TotalSupply() (*big.Int, error) { 357 return _IMasternodeToken.Contract.TotalSupply(&_IMasternodeToken.CallOpts) 358 } 359 360 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 361 // 362 // Solidity: function totalSupply() constant returns(uint256) 363 func (_IMasternodeToken *IMasternodeTokenCallerSession) TotalSupply() (*big.Int, error) { 364 return _IMasternodeToken.Contract.TotalSupply(&_IMasternodeToken.CallOpts) 365 } 366 367 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 368 // 369 // Solidity: function approve(address _spender, uint256 _value) returns(bool success) 370 func (_IMasternodeToken *IMasternodeTokenTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { 371 return _IMasternodeToken.contract.Transact(opts, "approve", _spender, _value) 372 } 373 374 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 375 // 376 // Solidity: function approve(address _spender, uint256 _value) returns(bool success) 377 func (_IMasternodeToken *IMasternodeTokenSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { 378 return _IMasternodeToken.Contract.Approve(&_IMasternodeToken.TransactOpts, _spender, _value) 379 } 380 381 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 382 // 383 // Solidity: function approve(address _spender, uint256 _value) returns(bool success) 384 func (_IMasternodeToken *IMasternodeTokenTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { 385 return _IMasternodeToken.Contract.Approve(&_IMasternodeToken.TransactOpts, _spender, _value) 386 } 387 388 // DepositCollateral is a paid mutator transaction binding the contract method 0x6f758140. 389 // 390 // Solidity: function depositCollateral() returns() 391 func (_IMasternodeToken *IMasternodeTokenTransactor) DepositCollateral(opts *bind.TransactOpts) (*types.Transaction, error) { 392 return _IMasternodeToken.contract.Transact(opts, "depositCollateral") 393 } 394 395 // DepositCollateral is a paid mutator transaction binding the contract method 0x6f758140. 396 // 397 // Solidity: function depositCollateral() returns() 398 func (_IMasternodeToken *IMasternodeTokenSession) DepositCollateral() (*types.Transaction, error) { 399 return _IMasternodeToken.Contract.DepositCollateral(&_IMasternodeToken.TransactOpts) 400 } 401 402 // DepositCollateral is a paid mutator transaction binding the contract method 0x6f758140. 403 // 404 // Solidity: function depositCollateral() returns() 405 func (_IMasternodeToken *IMasternodeTokenTransactorSession) DepositCollateral() (*types.Transaction, error) { 406 return _IMasternodeToken.Contract.DepositCollateral(&_IMasternodeToken.TransactOpts) 407 } 408 409 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 410 // 411 // Solidity: function transfer(address _to, uint256 _value) returns(bool success) 412 func (_IMasternodeToken *IMasternodeTokenTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { 413 return _IMasternodeToken.contract.Transact(opts, "transfer", _to, _value) 414 } 415 416 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 417 // 418 // Solidity: function transfer(address _to, uint256 _value) returns(bool success) 419 func (_IMasternodeToken *IMasternodeTokenSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { 420 return _IMasternodeToken.Contract.Transfer(&_IMasternodeToken.TransactOpts, _to, _value) 421 } 422 423 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 424 // 425 // Solidity: function transfer(address _to, uint256 _value) returns(bool success) 426 func (_IMasternodeToken *IMasternodeTokenTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { 427 return _IMasternodeToken.Contract.Transfer(&_IMasternodeToken.TransactOpts, _to, _value) 428 } 429 430 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 431 // 432 // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) 433 func (_IMasternodeToken *IMasternodeTokenTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { 434 return _IMasternodeToken.contract.Transact(opts, "transferFrom", _from, _to, _value) 435 } 436 437 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 438 // 439 // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) 440 func (_IMasternodeToken *IMasternodeTokenSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { 441 return _IMasternodeToken.Contract.TransferFrom(&_IMasternodeToken.TransactOpts, _from, _to, _value) 442 } 443 444 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 445 // 446 // Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success) 447 func (_IMasternodeToken *IMasternodeTokenTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { 448 return _IMasternodeToken.Contract.TransferFrom(&_IMasternodeToken.TransactOpts, _from, _to, _value) 449 } 450 451 // WithdrawCollateral is a paid mutator transaction binding the contract method 0x6112fe2e. 452 // 453 // Solidity: function withdrawCollateral(uint256 _amount) returns() 454 func (_IMasternodeToken *IMasternodeTokenTransactor) WithdrawCollateral(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { 455 return _IMasternodeToken.contract.Transact(opts, "withdrawCollateral", _amount) 456 } 457 458 // WithdrawCollateral is a paid mutator transaction binding the contract method 0x6112fe2e. 459 // 460 // Solidity: function withdrawCollateral(uint256 _amount) returns() 461 func (_IMasternodeToken *IMasternodeTokenSession) WithdrawCollateral(_amount *big.Int) (*types.Transaction, error) { 462 return _IMasternodeToken.Contract.WithdrawCollateral(&_IMasternodeToken.TransactOpts, _amount) 463 } 464 465 // WithdrawCollateral is a paid mutator transaction binding the contract method 0x6112fe2e. 466 // 467 // Solidity: function withdrawCollateral(uint256 _amount) returns() 468 func (_IMasternodeToken *IMasternodeTokenTransactorSession) WithdrawCollateral(_amount *big.Int) (*types.Transaction, error) { 469 return _IMasternodeToken.Contract.WithdrawCollateral(&_IMasternodeToken.TransactOpts, _amount) 470 } 471 472 // IMasternodeTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IMasternodeToken contract. 473 type IMasternodeTokenApprovalIterator struct { 474 Event *IMasternodeTokenApproval // Event containing the contract specifics and raw log 475 476 contract *bind.BoundContract // Generic contract to use for unpacking event data 477 event string // Event name to use for unpacking event data 478 479 logs chan types.Log // Log channel receiving the found contract events 480 sub ethereum.Subscription // Subscription for errors, completion and termination 481 done bool // Whether the subscription completed delivering logs 482 fail error // Occurred error to stop iteration 483 } 484 485 // Next advances the iterator to the subsequent event, returning whether there 486 // are any more events found. In case of a retrieval or parsing error, false is 487 // returned and Error() can be queried for the exact failure. 488 func (it *IMasternodeTokenApprovalIterator) Next() bool { 489 // If the iterator failed, stop iterating 490 if it.fail != nil { 491 return false 492 } 493 // If the iterator completed, deliver directly whatever's available 494 if it.done { 495 select { 496 case log := <-it.logs: 497 it.Event = new(IMasternodeTokenApproval) 498 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 499 it.fail = err 500 return false 501 } 502 it.Event.Raw = log 503 return true 504 505 default: 506 return false 507 } 508 } 509 // Iterator still in progress, wait for either a data or an error event 510 select { 511 case log := <-it.logs: 512 it.Event = new(IMasternodeTokenApproval) 513 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 514 it.fail = err 515 return false 516 } 517 it.Event.Raw = log 518 return true 519 520 case err := <-it.sub.Err(): 521 it.done = true 522 it.fail = err 523 return it.Next() 524 } 525 } 526 527 // Error returns any retrieval or parsing error occurred during filtering. 528 func (it *IMasternodeTokenApprovalIterator) Error() error { 529 return it.fail 530 } 531 532 // Close terminates the iteration process, releasing any pending underlying 533 // resources. 534 func (it *IMasternodeTokenApprovalIterator) Close() error { 535 it.sub.Unsubscribe() 536 return nil 537 } 538 539 // IMasternodeTokenApproval represents a Approval event raised by the IMasternodeToken contract. 540 type IMasternodeTokenApproval struct { 541 Owner common.Address 542 Spender common.Address 543 Value *big.Int 544 Raw types.Log // Blockchain specific contextual infos 545 } 546 547 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 548 // 549 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 550 func (_IMasternodeToken *IMasternodeTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IMasternodeTokenApprovalIterator, error) { 551 552 var ownerRule []interface{} 553 for _, ownerItem := range owner { 554 ownerRule = append(ownerRule, ownerItem) 555 } 556 var spenderRule []interface{} 557 for _, spenderItem := range spender { 558 spenderRule = append(spenderRule, spenderItem) 559 } 560 561 logs, sub, err := _IMasternodeToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 562 if err != nil { 563 return nil, err 564 } 565 return &IMasternodeTokenApprovalIterator{contract: _IMasternodeToken.contract, event: "Approval", logs: logs, sub: sub}, nil 566 } 567 568 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 569 // 570 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 571 func (_IMasternodeToken *IMasternodeTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IMasternodeTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 572 573 var ownerRule []interface{} 574 for _, ownerItem := range owner { 575 ownerRule = append(ownerRule, ownerItem) 576 } 577 var spenderRule []interface{} 578 for _, spenderItem := range spender { 579 spenderRule = append(spenderRule, spenderItem) 580 } 581 582 logs, sub, err := _IMasternodeToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 583 if err != nil { 584 return nil, err 585 } 586 return event.NewSubscription(func(quit <-chan struct{}) error { 587 defer sub.Unsubscribe() 588 for { 589 select { 590 case log := <-logs: 591 // New log arrived, parse the event and forward to the user 592 event := new(IMasternodeTokenApproval) 593 if err := _IMasternodeToken.contract.UnpackLog(event, "Approval", log); err != nil { 594 return err 595 } 596 event.Raw = log 597 598 select { 599 case sink <- event: 600 case err := <-sub.Err(): 601 return err 602 case <-quit: 603 return nil 604 } 605 case err := <-sub.Err(): 606 return err 607 case <-quit: 608 return nil 609 } 610 } 611 }), nil 612 } 613 614 // IMasternodeTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IMasternodeToken contract. 615 type IMasternodeTokenTransferIterator struct { 616 Event *IMasternodeTokenTransfer // Event containing the contract specifics and raw log 617 618 contract *bind.BoundContract // Generic contract to use for unpacking event data 619 event string // Event name to use for unpacking event data 620 621 logs chan types.Log // Log channel receiving the found contract events 622 sub ethereum.Subscription // Subscription for errors, completion and termination 623 done bool // Whether the subscription completed delivering logs 624 fail error // Occurred error to stop iteration 625 } 626 627 // Next advances the iterator to the subsequent event, returning whether there 628 // are any more events found. In case of a retrieval or parsing error, false is 629 // returned and Error() can be queried for the exact failure. 630 func (it *IMasternodeTokenTransferIterator) Next() bool { 631 // If the iterator failed, stop iterating 632 if it.fail != nil { 633 return false 634 } 635 // If the iterator completed, deliver directly whatever's available 636 if it.done { 637 select { 638 case log := <-it.logs: 639 it.Event = new(IMasternodeTokenTransfer) 640 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 641 it.fail = err 642 return false 643 } 644 it.Event.Raw = log 645 return true 646 647 default: 648 return false 649 } 650 } 651 // Iterator still in progress, wait for either a data or an error event 652 select { 653 case log := <-it.logs: 654 it.Event = new(IMasternodeTokenTransfer) 655 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 656 it.fail = err 657 return false 658 } 659 it.Event.Raw = log 660 return true 661 662 case err := <-it.sub.Err(): 663 it.done = true 664 it.fail = err 665 return it.Next() 666 } 667 } 668 669 // Error returns any retrieval or parsing error occurred during filtering. 670 func (it *IMasternodeTokenTransferIterator) Error() error { 671 return it.fail 672 } 673 674 // Close terminates the iteration process, releasing any pending underlying 675 // resources. 676 func (it *IMasternodeTokenTransferIterator) Close() error { 677 it.sub.Unsubscribe() 678 return nil 679 } 680 681 // IMasternodeTokenTransfer represents a Transfer event raised by the IMasternodeToken contract. 682 type IMasternodeTokenTransfer struct { 683 From common.Address 684 To common.Address 685 Value *big.Int 686 Raw types.Log // Blockchain specific contextual infos 687 } 688 689 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 690 // 691 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 692 func (_IMasternodeToken *IMasternodeTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IMasternodeTokenTransferIterator, error) { 693 694 var fromRule []interface{} 695 for _, fromItem := range from { 696 fromRule = append(fromRule, fromItem) 697 } 698 var toRule []interface{} 699 for _, toItem := range to { 700 toRule = append(toRule, toItem) 701 } 702 703 logs, sub, err := _IMasternodeToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 704 if err != nil { 705 return nil, err 706 } 707 return &IMasternodeTokenTransferIterator{contract: _IMasternodeToken.contract, event: "Transfer", logs: logs, sub: sub}, nil 708 } 709 710 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 711 // 712 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 713 func (_IMasternodeToken *IMasternodeTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IMasternodeTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 714 715 var fromRule []interface{} 716 for _, fromItem := range from { 717 fromRule = append(fromRule, fromItem) 718 } 719 var toRule []interface{} 720 for _, toItem := range to { 721 toRule = append(toRule, toItem) 722 } 723 724 logs, sub, err := _IMasternodeToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 725 if err != nil { 726 return nil, err 727 } 728 return event.NewSubscription(func(quit <-chan struct{}) error { 729 defer sub.Unsubscribe() 730 for { 731 select { 732 case log := <-logs: 733 // New log arrived, parse the event and forward to the user 734 event := new(IMasternodeTokenTransfer) 735 if err := _IMasternodeToken.contract.UnpackLog(event, "Transfer", log); err != nil { 736 return err 737 } 738 event.Raw = log 739 740 select { 741 case sink <- event: 742 case err := <-sub.Err(): 743 return err 744 case <-quit: 745 return nil 746 } 747 case err := <-sub.Err(): 748 return err 749 case <-quit: 750 return nil 751 } 752 } 753 }), nil 754 }