github.com/Onther-Tech/plasma-evm@v0.0.0-rc7.7/contracts/plasma/mintabletoken/mintabletoken.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 mintabletoken 5 6 import ( 7 "math/big" 8 "strings" 9 10 "github.com/Onther-Tech/plasma-evm" 11 "github.com/Onther-Tech/plasma-evm/accounts/abi" 12 "github.com/Onther-Tech/plasma-evm/accounts/abi/bind" 13 "github.com/Onther-Tech/plasma-evm/common" 14 "github.com/Onther-Tech/plasma-evm/core/types" 15 "github.com/Onther-Tech/plasma-evm/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 // ContextABI is the input ABI used to generate the binding from. 31 const ContextABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]" 32 33 // Context is an auto generated Go binding around an Ethereum contract. 34 type Context struct { 35 ContextCaller // Read-only binding to the contract 36 ContextTransactor // Write-only binding to the contract 37 ContextFilterer // Log filterer for contract events 38 } 39 40 // ContextCaller is an auto generated read-only Go binding around an Ethereum contract. 41 type ContextCaller struct { 42 contract *bind.BoundContract // Generic contract wrapper for the low level calls 43 } 44 45 // ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. 46 type ContextTransactor struct { 47 contract *bind.BoundContract // Generic contract wrapper for the low level calls 48 } 49 50 // ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 51 type ContextFilterer struct { 52 contract *bind.BoundContract // Generic contract wrapper for the low level calls 53 } 54 55 // ContextSession is an auto generated Go binding around an Ethereum contract, 56 // with pre-set call and transact options. 57 type ContextSession struct { 58 Contract *Context // 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 // ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, 64 // with pre-set call options. 65 type ContextCallerSession struct { 66 Contract *ContextCaller // Generic contract caller binding to set the session for 67 CallOpts bind.CallOpts // Call options to use throughout this session 68 } 69 70 // ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 71 // with pre-set transact options. 72 type ContextTransactorSession struct { 73 Contract *ContextTransactor // Generic contract transactor binding to set the session for 74 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 75 } 76 77 // ContextRaw is an auto generated low-level Go binding around an Ethereum contract. 78 type ContextRaw struct { 79 Contract *Context // Generic contract binding to access the raw methods on 80 } 81 82 // ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 83 type ContextCallerRaw struct { 84 Contract *ContextCaller // Generic read-only contract binding to access the raw methods on 85 } 86 87 // ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 88 type ContextTransactorRaw struct { 89 Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on 90 } 91 92 // NewContext creates a new instance of Context, bound to a specific deployed contract. 93 func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { 94 contract, err := bindContext(address, backend, backend, backend) 95 if err != nil { 96 return nil, err 97 } 98 return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil 99 } 100 101 // NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. 102 func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { 103 contract, err := bindContext(address, caller, nil, nil) 104 if err != nil { 105 return nil, err 106 } 107 return &ContextCaller{contract: contract}, nil 108 } 109 110 // NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. 111 func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { 112 contract, err := bindContext(address, nil, transactor, nil) 113 if err != nil { 114 return nil, err 115 } 116 return &ContextTransactor{contract: contract}, nil 117 } 118 119 // NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. 120 func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { 121 contract, err := bindContext(address, nil, nil, filterer) 122 if err != nil { 123 return nil, err 124 } 125 return &ContextFilterer{contract: contract}, nil 126 } 127 128 // bindContext binds a generic wrapper to an already deployed contract. 129 func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 130 parsed, err := abi.JSON(strings.NewReader(ContextABI)) 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 142 return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 148 return _Context.Contract.ContextTransactor.contract.Transfer(opts) 149 } 150 151 // Transact invokes the (paid) contract method with params as input values. 152 func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 153 return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 161 return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 167 return _Context.Contract.contract.Transfer(opts) 168 } 169 170 // Transact invokes the (paid) contract method with params as input values. 171 func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 172 return _Context.Contract.contract.Transact(opts, method, params...) 173 } 174 175 // ERC20ABI is the input ABI used to generate the binding from. 176 const ERC20ABI = "[{\"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\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 177 178 // ERC20FuncSigs maps the 4-byte function signature to its string representation. 179 var ERC20FuncSigs = map[string]string{ 180 "dd62ed3e": "allowance(address,address)", 181 "095ea7b3": "approve(address,uint256)", 182 "70a08231": "balanceOf(address)", 183 "a457c2d7": "decreaseAllowance(address,uint256)", 184 "39509351": "increaseAllowance(address,uint256)", 185 "18160ddd": "totalSupply()", 186 "a9059cbb": "transfer(address,uint256)", 187 "23b872dd": "transferFrom(address,address,uint256)", 188 } 189 190 // ERC20Bin is the compiled bytecode used for deploying new contracts. 191 var ERC20Bin = "0x608060405261083b806100136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d5610212565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610218565b6100b96004803603604081101561013357600080fd5b506001600160a01b0381351690602001356102a5565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102f9565b6100b96004803603604081101561018557600080fd5b506001600160a01b038135169060200135610314565b6100b9600480360360408110156101b157600080fd5b506001600160a01b038135169060200135610382565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610396565b60006102096102026103c1565b84846103c5565b50600192915050565b60025490565b60006102258484846104b1565b61029b846102316103c1565b61029685604051806060016040528060288152602001610771602891396001600160a01b038a1660009081526001602052604081209061026f6103c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61060d16565b6103c5565b5060019392505050565b60006102096102b26103c1565b8461029685600160006102c36103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6106a416565b6001600160a01b031660009081526020819052604090205490565b60006102096103216103c1565b84610296856040518060600160405280602581526020016107e2602591396001600061034b6103c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61060d16565b600061020961038f6103c1565b84846104b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661040a5760405162461bcd60e51b81526004018080602001828103825260248152602001806107be6024913960400191505060405180910390fd5b6001600160a01b03821661044f5760405162461bcd60e51b81526004018080602001828103825260228152602001806107296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104f65760405162461bcd60e51b81526004018080602001828103825260258152602001806107996025913960400191505060405180910390fd5b6001600160a01b03821661053b5760405162461bcd60e51b81526004018080602001828103825260238152602001806107066023913960400191505060405180910390fd5b61057e8160405180606001604052806026815260200161074b602691396001600160a01b038616600090815260208190526040902054919063ffffffff61060d16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546105b3908263ffffffff6106a416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561069c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610661578181015183820152602001610649565b50505050905090810190601f16801561068e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156106fe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582008ca9864b08faad547b35ef43549788be26de128b59e0167fefa4ac97cd6733964736f6c634300050c0032" 192 193 // DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. 194 func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { 195 parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) 196 if err != nil { 197 return common.Address{}, nil, nil, err 198 } 199 200 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) 201 if err != nil { 202 return common.Address{}, nil, nil, err 203 } 204 return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil 205 } 206 207 // ERC20 is an auto generated Go binding around an Ethereum contract. 208 type ERC20 struct { 209 ERC20Caller // Read-only binding to the contract 210 ERC20Transactor // Write-only binding to the contract 211 ERC20Filterer // Log filterer for contract events 212 } 213 214 // ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. 215 type ERC20Caller struct { 216 contract *bind.BoundContract // Generic contract wrapper for the low level calls 217 } 218 219 // ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. 220 type ERC20Transactor struct { 221 contract *bind.BoundContract // Generic contract wrapper for the low level calls 222 } 223 224 // ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. 225 type ERC20Filterer struct { 226 contract *bind.BoundContract // Generic contract wrapper for the low level calls 227 } 228 229 // ERC20Session is an auto generated Go binding around an Ethereum contract, 230 // with pre-set call and transact options. 231 type ERC20Session struct { 232 Contract *ERC20 // Generic contract binding to set the session for 233 CallOpts bind.CallOpts // Call options to use throughout this session 234 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 235 } 236 237 // ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, 238 // with pre-set call options. 239 type ERC20CallerSession struct { 240 Contract *ERC20Caller // Generic contract caller binding to set the session for 241 CallOpts bind.CallOpts // Call options to use throughout this session 242 } 243 244 // ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, 245 // with pre-set transact options. 246 type ERC20TransactorSession struct { 247 Contract *ERC20Transactor // Generic contract transactor binding to set the session for 248 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 249 } 250 251 // ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. 252 type ERC20Raw struct { 253 Contract *ERC20 // Generic contract binding to access the raw methods on 254 } 255 256 // ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 257 type ERC20CallerRaw struct { 258 Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on 259 } 260 261 // ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 262 type ERC20TransactorRaw struct { 263 Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on 264 } 265 266 // NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. 267 func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { 268 contract, err := bindERC20(address, backend, backend, backend) 269 if err != nil { 270 return nil, err 271 } 272 return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil 273 } 274 275 // NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. 276 func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { 277 contract, err := bindERC20(address, caller, nil, nil) 278 if err != nil { 279 return nil, err 280 } 281 return &ERC20Caller{contract: contract}, nil 282 } 283 284 // NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. 285 func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { 286 contract, err := bindERC20(address, nil, transactor, nil) 287 if err != nil { 288 return nil, err 289 } 290 return &ERC20Transactor{contract: contract}, nil 291 } 292 293 // NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. 294 func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { 295 contract, err := bindERC20(address, nil, nil, filterer) 296 if err != nil { 297 return nil, err 298 } 299 return &ERC20Filterer{contract: contract}, nil 300 } 301 302 // bindERC20 binds a generic wrapper to an already deployed contract. 303 func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 304 parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) 305 if err != nil { 306 return nil, err 307 } 308 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 309 } 310 311 // Call invokes the (constant) contract method with params as input values and 312 // sets the output to result. The result type might be a single field for simple 313 // returns, a slice of interfaces for anonymous returns and a struct for named 314 // returns. 315 func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 316 return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...) 317 } 318 319 // Transfer initiates a plain transaction to move funds to the contract, calling 320 // its default method if one is available. 321 func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 322 return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) 323 } 324 325 // Transact invokes the (paid) contract method with params as input values. 326 func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 327 return _ERC20.Contract.ERC20Transactor.contract.Transact(opts, method, params...) 328 } 329 330 // Call invokes the (constant) contract method with params as input values and 331 // sets the output to result. The result type might be a single field for simple 332 // returns, a slice of interfaces for anonymous returns and a struct for named 333 // returns. 334 func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 335 return _ERC20.Contract.contract.Call(opts, result, method, params...) 336 } 337 338 // Transfer initiates a plain transaction to move funds to the contract, calling 339 // its default method if one is available. 340 func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 341 return _ERC20.Contract.contract.Transfer(opts) 342 } 343 344 // Transact invokes the (paid) contract method with params as input values. 345 func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 346 return _ERC20.Contract.contract.Transact(opts, method, params...) 347 } 348 349 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 350 // 351 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 352 func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 353 var ( 354 ret0 = new(*big.Int) 355 ) 356 out := ret0 357 err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) 358 return *ret0, err 359 } 360 361 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 362 // 363 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 364 func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 365 return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) 366 } 367 368 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 369 // 370 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 371 func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 372 return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) 373 } 374 375 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 376 // 377 // Solidity: function balanceOf(address account) constant returns(uint256) 378 func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 379 var ( 380 ret0 = new(*big.Int) 381 ) 382 out := ret0 383 err := _ERC20.contract.Call(opts, out, "balanceOf", account) 384 return *ret0, err 385 } 386 387 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 388 // 389 // Solidity: function balanceOf(address account) constant returns(uint256) 390 func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { 391 return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) 392 } 393 394 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 395 // 396 // Solidity: function balanceOf(address account) constant returns(uint256) 397 func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { 398 return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) 399 } 400 401 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 402 // 403 // Solidity: function totalSupply() constant returns(uint256) 404 func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 405 var ( 406 ret0 = new(*big.Int) 407 ) 408 out := ret0 409 err := _ERC20.contract.Call(opts, out, "totalSupply") 410 return *ret0, err 411 } 412 413 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 414 // 415 // Solidity: function totalSupply() constant returns(uint256) 416 func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { 417 return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) 418 } 419 420 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 421 // 422 // Solidity: function totalSupply() constant returns(uint256) 423 func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { 424 return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) 425 } 426 427 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 428 // 429 // Solidity: function approve(address spender, uint256 amount) returns(bool) 430 func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { 431 return _ERC20.contract.Transact(opts, "approve", spender, amount) 432 } 433 434 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 435 // 436 // Solidity: function approve(address spender, uint256 amount) returns(bool) 437 func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 438 return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) 439 } 440 441 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 442 // 443 // Solidity: function approve(address spender, uint256 amount) returns(bool) 444 func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 445 return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) 446 } 447 448 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 449 // 450 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 451 func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 452 return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 453 } 454 455 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 456 // 457 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 458 func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 459 return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) 460 } 461 462 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 463 // 464 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 465 func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 466 return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) 467 } 468 469 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 470 // 471 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 472 func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 473 return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) 474 } 475 476 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 477 // 478 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 479 func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 480 return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) 481 } 482 483 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 484 // 485 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 486 func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 487 return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) 488 } 489 490 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 491 // 492 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 493 func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 494 return _ERC20.contract.Transact(opts, "transfer", recipient, amount) 495 } 496 497 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 498 // 499 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 500 func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 501 return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) 502 } 503 504 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 505 // 506 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 507 func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 508 return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) 509 } 510 511 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 512 // 513 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 514 func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 515 return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) 516 } 517 518 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 519 // 520 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 521 func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 522 return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) 523 } 524 525 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 526 // 527 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 528 func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 529 return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) 530 } 531 532 // ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. 533 type ERC20ApprovalIterator struct { 534 Event *ERC20Approval // Event containing the contract specifics and raw log 535 536 contract *bind.BoundContract // Generic contract to use for unpacking event data 537 event string // Event name to use for unpacking event data 538 539 logs chan types.Log // Log channel receiving the found contract events 540 sub ethereum.Subscription // Subscription for errors, completion and termination 541 done bool // Whether the subscription completed delivering logs 542 fail error // Occurred error to stop iteration 543 } 544 545 // Next advances the iterator to the subsequent event, returning whether there 546 // are any more events found. In case of a retrieval or parsing error, false is 547 // returned and Error() can be queried for the exact failure. 548 func (it *ERC20ApprovalIterator) Next() bool { 549 // If the iterator failed, stop iterating 550 if it.fail != nil { 551 return false 552 } 553 // If the iterator completed, deliver directly whatever's available 554 if it.done { 555 select { 556 case log := <-it.logs: 557 it.Event = new(ERC20Approval) 558 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 559 it.fail = err 560 return false 561 } 562 it.Event.Raw = log 563 return true 564 565 default: 566 return false 567 } 568 } 569 // Iterator still in progress, wait for either a data or an error event 570 select { 571 case log := <-it.logs: 572 it.Event = new(ERC20Approval) 573 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 574 it.fail = err 575 return false 576 } 577 it.Event.Raw = log 578 return true 579 580 case err := <-it.sub.Err(): 581 it.done = true 582 it.fail = err 583 return it.Next() 584 } 585 } 586 587 // Error returns any retrieval or parsing error occurred during filtering. 588 func (it *ERC20ApprovalIterator) Error() error { 589 return it.fail 590 } 591 592 // Close terminates the iteration process, releasing any pending underlying 593 // resources. 594 func (it *ERC20ApprovalIterator) Close() error { 595 it.sub.Unsubscribe() 596 return nil 597 } 598 599 // ERC20Approval represents a Approval event raised by the ERC20 contract. 600 type ERC20Approval struct { 601 Owner common.Address 602 Spender common.Address 603 Value *big.Int 604 Raw types.Log // Blockchain specific contextual infos 605 } 606 607 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 608 // 609 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 610 func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { 611 612 var ownerRule []interface{} 613 for _, ownerItem := range owner { 614 ownerRule = append(ownerRule, ownerItem) 615 } 616 var spenderRule []interface{} 617 for _, spenderItem := range spender { 618 spenderRule = append(spenderRule, spenderItem) 619 } 620 621 logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 622 if err != nil { 623 return nil, err 624 } 625 return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil 626 } 627 628 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 629 // 630 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 631 func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 632 633 var ownerRule []interface{} 634 for _, ownerItem := range owner { 635 ownerRule = append(ownerRule, ownerItem) 636 } 637 var spenderRule []interface{} 638 for _, spenderItem := range spender { 639 spenderRule = append(spenderRule, spenderItem) 640 } 641 642 logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 643 if err != nil { 644 return nil, err 645 } 646 return event.NewSubscription(func(quit <-chan struct{}) error { 647 defer sub.Unsubscribe() 648 for { 649 select { 650 case log := <-logs: 651 // New log arrived, parse the event and forward to the user 652 event := new(ERC20Approval) 653 if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { 654 return err 655 } 656 event.Raw = log 657 658 select { 659 case sink <- event: 660 case err := <-sub.Err(): 661 return err 662 case <-quit: 663 return nil 664 } 665 case err := <-sub.Err(): 666 return err 667 case <-quit: 668 return nil 669 } 670 } 671 }), nil 672 } 673 674 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 675 // 676 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 677 func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { 678 event := new(ERC20Approval) 679 if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { 680 return nil, err 681 } 682 return event, nil 683 } 684 685 // ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. 686 type ERC20TransferIterator struct { 687 Event *ERC20Transfer // Event containing the contract specifics and raw log 688 689 contract *bind.BoundContract // Generic contract to use for unpacking event data 690 event string // Event name to use for unpacking event data 691 692 logs chan types.Log // Log channel receiving the found contract events 693 sub ethereum.Subscription // Subscription for errors, completion and termination 694 done bool // Whether the subscription completed delivering logs 695 fail error // Occurred error to stop iteration 696 } 697 698 // Next advances the iterator to the subsequent event, returning whether there 699 // are any more events found. In case of a retrieval or parsing error, false is 700 // returned and Error() can be queried for the exact failure. 701 func (it *ERC20TransferIterator) Next() bool { 702 // If the iterator failed, stop iterating 703 if it.fail != nil { 704 return false 705 } 706 // If the iterator completed, deliver directly whatever's available 707 if it.done { 708 select { 709 case log := <-it.logs: 710 it.Event = new(ERC20Transfer) 711 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 712 it.fail = err 713 return false 714 } 715 it.Event.Raw = log 716 return true 717 718 default: 719 return false 720 } 721 } 722 // Iterator still in progress, wait for either a data or an error event 723 select { 724 case log := <-it.logs: 725 it.Event = new(ERC20Transfer) 726 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 727 it.fail = err 728 return false 729 } 730 it.Event.Raw = log 731 return true 732 733 case err := <-it.sub.Err(): 734 it.done = true 735 it.fail = err 736 return it.Next() 737 } 738 } 739 740 // Error returns any retrieval or parsing error occurred during filtering. 741 func (it *ERC20TransferIterator) Error() error { 742 return it.fail 743 } 744 745 // Close terminates the iteration process, releasing any pending underlying 746 // resources. 747 func (it *ERC20TransferIterator) Close() error { 748 it.sub.Unsubscribe() 749 return nil 750 } 751 752 // ERC20Transfer represents a Transfer event raised by the ERC20 contract. 753 type ERC20Transfer struct { 754 From common.Address 755 To common.Address 756 Value *big.Int 757 Raw types.Log // Blockchain specific contextual infos 758 } 759 760 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 761 // 762 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 763 func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { 764 765 var fromRule []interface{} 766 for _, fromItem := range from { 767 fromRule = append(fromRule, fromItem) 768 } 769 var toRule []interface{} 770 for _, toItem := range to { 771 toRule = append(toRule, toItem) 772 } 773 774 logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 775 if err != nil { 776 return nil, err 777 } 778 return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil 779 } 780 781 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 782 // 783 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 784 func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { 785 786 var fromRule []interface{} 787 for _, fromItem := range from { 788 fromRule = append(fromRule, fromItem) 789 } 790 var toRule []interface{} 791 for _, toItem := range to { 792 toRule = append(toRule, toItem) 793 } 794 795 logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 796 if err != nil { 797 return nil, err 798 } 799 return event.NewSubscription(func(quit <-chan struct{}) error { 800 defer sub.Unsubscribe() 801 for { 802 select { 803 case log := <-logs: 804 // New log arrived, parse the event and forward to the user 805 event := new(ERC20Transfer) 806 if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 807 return err 808 } 809 event.Raw = log 810 811 select { 812 case sink <- event: 813 case err := <-sub.Err(): 814 return err 815 case <-quit: 816 return nil 817 } 818 case err := <-sub.Err(): 819 return err 820 case <-quit: 821 return nil 822 } 823 } 824 }), nil 825 } 826 827 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 828 // 829 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 830 func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { 831 event := new(ERC20Transfer) 832 if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 833 return nil, err 834 } 835 return event, nil 836 } 837 838 // ERC20MintableABI is the input ABI used to generate the binding from. 839 const ERC20MintableABI = "[{\"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\":\"account\",\"type\":\"address\"}],\"name\":\"MinterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterRemoved\",\"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\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 840 841 // ERC20MintableFuncSigs maps the 4-byte function signature to its string representation. 842 var ERC20MintableFuncSigs = map[string]string{ 843 "983b2d56": "addMinter(address)", 844 "dd62ed3e": "allowance(address,address)", 845 "095ea7b3": "approve(address,uint256)", 846 "70a08231": "balanceOf(address)", 847 "a457c2d7": "decreaseAllowance(address,uint256)", 848 "39509351": "increaseAllowance(address,uint256)", 849 "aa271e1a": "isMinter(address)", 850 "40c10f19": "mint(address,uint256)", 851 "98650275": "renounceMinter()", 852 "18160ddd": "totalSupply()", 853 "a9059cbb": "transfer(address,uint256)", 854 "23b872dd": "transferFrom(address,address,uint256)", 855 } 856 857 // ERC20MintableBin is the compiled bytecode used for deploying new contracts. 858 var ERC20MintableBin = "0x60806040526100266100186001600160e01b0361002b16565b6001600160e01b0361002f16565b6101a3565b3390565b61004781600361007e60201b610a6e1790919060201c565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b61009182826001600160e01b0361012216565b156100fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b038216610183576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610eb16022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610cff806101b26000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063983b2d5611610071578063983b2d56146101c757806398650275146101ef578063a457c2d7146101f7578063a9059cbb14610223578063aa271e1a1461024f578063dd62ed3e14610275576100b4565b8063095ea7b3146100b957806318160ddd146100f957806323b872dd14610113578063395093511461014957806340c10f191461017557806370a08231146101a1575b600080fd5b6100e5600480360360408110156100cf57600080fd5b506001600160a01b0381351690602001356102a3565b604080519115158252519081900360200190f35b6101016102c0565b60408051918252519081900360200190f35b6100e56004803603606081101561012957600080fd5b506001600160a01b038135811691602081013590911690604001356102c6565b6100e56004803603604081101561015f57600080fd5b506001600160a01b038135169060200135610353565b6100e56004803603604081101561018b57600080fd5b506001600160a01b0381351690602001356103a7565b610101600480360360208110156101b757600080fd5b50356001600160a01b03166103fe565b6101ed600480360360208110156101dd57600080fd5b50356001600160a01b0316610419565b005b6101ed61046b565b6100e56004803603604081101561020d57600080fd5b506001600160a01b03813516906020013561047d565b6100e56004803603604081101561023957600080fd5b506001600160a01b0381351690602001356104eb565b6100e56004803603602081101561026557600080fd5b50356001600160a01b03166104ff565b6101016004803603604081101561028b57600080fd5b506001600160a01b0381358116916020013516610518565b60006102b76102b0610543565b8484610547565b50600192915050565b60025490565b60006102d3848484610633565b610349846102df610543565b61034485604051806060016040528060288152602001610c13602891396001600160a01b038a1660009081526001602052604081209061031d610543565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61078f16565b610547565b5060019392505050565b60006102b7610360610543565b846103448560016000610371610543565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61082616565b60006103b96103b4610543565b6104ff565b6103f45760405162461bcd60e51b8152600401808060200182810382526030815260200180610bc26030913960400191505060405180910390fd5b6102b78383610887565b6001600160a01b031660009081526020819052604090205490565b6104246103b4610543565b61045f5760405162461bcd60e51b8152600401808060200182810382526030815260200180610bc26030913960400191505060405180910390fd5b61046881610977565b50565b61047b610476610543565b6109bf565b565b60006102b761048a610543565b8461034485604051806060016040528060258152602001610ca660259139600160006104b4610543565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61078f16565b60006102b76104f8610543565b8484610633565b600061051260038363ffffffff610a0716565b92915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661058c5760405162461bcd60e51b8152600401808060200182810382526024815260200180610c826024913960400191505060405180910390fd5b6001600160a01b0382166105d15760405162461bcd60e51b8152600401808060200182810382526022815260200180610b7a6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106785760405162461bcd60e51b8152600401808060200182810382526025815260200180610c5d6025913960400191505060405180910390fd5b6001600160a01b0382166106bd5760405162461bcd60e51b8152600401808060200182810382526023815260200180610b576023913960400191505060405180910390fd5b61070081604051806060016040528060268152602001610b9c602691396001600160a01b038616600090815260208190526040902054919063ffffffff61078f16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610735908263ffffffff61082616565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561081e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107e35781810151838201526020016107cb565b50505050905090810190601f1680156108105780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610880576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166108e2576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6002546108f5908263ffffffff61082616565b6002556001600160a01b038216600090815260208190526040902054610921908263ffffffff61082616565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b61098860038263ffffffff610a6e16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6109d060038263ffffffff610aef16565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b038216610a4e5760405162461bcd60e51b8152600401808060200182810382526022815260200180610c3b6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610a788282610a07565b15610aca576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610af98282610a07565b610b345760405162461bcd60e51b8152600401808060200182810382526021815260200180610bf26021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158209bffbae26a8473ab446e60484fc8f37931f262c4c630ff4ea7ef2fd99a2a4ba364736f6c634300050c0032526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373" 859 860 // DeployERC20Mintable deploys a new Ethereum contract, binding an instance of ERC20Mintable to it. 861 func DeployERC20Mintable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Mintable, error) { 862 parsed, err := abi.JSON(strings.NewReader(ERC20MintableABI)) 863 if err != nil { 864 return common.Address{}, nil, nil, err 865 } 866 867 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20MintableBin), backend) 868 if err != nil { 869 return common.Address{}, nil, nil, err 870 } 871 return address, tx, &ERC20Mintable{ERC20MintableCaller: ERC20MintableCaller{contract: contract}, ERC20MintableTransactor: ERC20MintableTransactor{contract: contract}, ERC20MintableFilterer: ERC20MintableFilterer{contract: contract}}, nil 872 } 873 874 // ERC20Mintable is an auto generated Go binding around an Ethereum contract. 875 type ERC20Mintable struct { 876 ERC20MintableCaller // Read-only binding to the contract 877 ERC20MintableTransactor // Write-only binding to the contract 878 ERC20MintableFilterer // Log filterer for contract events 879 } 880 881 // ERC20MintableCaller is an auto generated read-only Go binding around an Ethereum contract. 882 type ERC20MintableCaller struct { 883 contract *bind.BoundContract // Generic contract wrapper for the low level calls 884 } 885 886 // ERC20MintableTransactor is an auto generated write-only Go binding around an Ethereum contract. 887 type ERC20MintableTransactor struct { 888 contract *bind.BoundContract // Generic contract wrapper for the low level calls 889 } 890 891 // ERC20MintableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 892 type ERC20MintableFilterer struct { 893 contract *bind.BoundContract // Generic contract wrapper for the low level calls 894 } 895 896 // ERC20MintableSession is an auto generated Go binding around an Ethereum contract, 897 // with pre-set call and transact options. 898 type ERC20MintableSession struct { 899 Contract *ERC20Mintable // Generic contract binding to set the session for 900 CallOpts bind.CallOpts // Call options to use throughout this session 901 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 902 } 903 904 // ERC20MintableCallerSession is an auto generated read-only Go binding around an Ethereum contract, 905 // with pre-set call options. 906 type ERC20MintableCallerSession struct { 907 Contract *ERC20MintableCaller // Generic contract caller binding to set the session for 908 CallOpts bind.CallOpts // Call options to use throughout this session 909 } 910 911 // ERC20MintableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 912 // with pre-set transact options. 913 type ERC20MintableTransactorSession struct { 914 Contract *ERC20MintableTransactor // Generic contract transactor binding to set the session for 915 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 916 } 917 918 // ERC20MintableRaw is an auto generated low-level Go binding around an Ethereum contract. 919 type ERC20MintableRaw struct { 920 Contract *ERC20Mintable // Generic contract binding to access the raw methods on 921 } 922 923 // ERC20MintableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 924 type ERC20MintableCallerRaw struct { 925 Contract *ERC20MintableCaller // Generic read-only contract binding to access the raw methods on 926 } 927 928 // ERC20MintableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 929 type ERC20MintableTransactorRaw struct { 930 Contract *ERC20MintableTransactor // Generic write-only contract binding to access the raw methods on 931 } 932 933 // NewERC20Mintable creates a new instance of ERC20Mintable, bound to a specific deployed contract. 934 func NewERC20Mintable(address common.Address, backend bind.ContractBackend) (*ERC20Mintable, error) { 935 contract, err := bindERC20Mintable(address, backend, backend, backend) 936 if err != nil { 937 return nil, err 938 } 939 return &ERC20Mintable{ERC20MintableCaller: ERC20MintableCaller{contract: contract}, ERC20MintableTransactor: ERC20MintableTransactor{contract: contract}, ERC20MintableFilterer: ERC20MintableFilterer{contract: contract}}, nil 940 } 941 942 // NewERC20MintableCaller creates a new read-only instance of ERC20Mintable, bound to a specific deployed contract. 943 func NewERC20MintableCaller(address common.Address, caller bind.ContractCaller) (*ERC20MintableCaller, error) { 944 contract, err := bindERC20Mintable(address, caller, nil, nil) 945 if err != nil { 946 return nil, err 947 } 948 return &ERC20MintableCaller{contract: contract}, nil 949 } 950 951 // NewERC20MintableTransactor creates a new write-only instance of ERC20Mintable, bound to a specific deployed contract. 952 func NewERC20MintableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20MintableTransactor, error) { 953 contract, err := bindERC20Mintable(address, nil, transactor, nil) 954 if err != nil { 955 return nil, err 956 } 957 return &ERC20MintableTransactor{contract: contract}, nil 958 } 959 960 // NewERC20MintableFilterer creates a new log filterer instance of ERC20Mintable, bound to a specific deployed contract. 961 func NewERC20MintableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20MintableFilterer, error) { 962 contract, err := bindERC20Mintable(address, nil, nil, filterer) 963 if err != nil { 964 return nil, err 965 } 966 return &ERC20MintableFilterer{contract: contract}, nil 967 } 968 969 // bindERC20Mintable binds a generic wrapper to an already deployed contract. 970 func bindERC20Mintable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 971 parsed, err := abi.JSON(strings.NewReader(ERC20MintableABI)) 972 if err != nil { 973 return nil, err 974 } 975 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 976 } 977 978 // Call invokes the (constant) contract method with params as input values and 979 // sets the output to result. The result type might be a single field for simple 980 // returns, a slice of interfaces for anonymous returns and a struct for named 981 // returns. 982 func (_ERC20Mintable *ERC20MintableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 983 return _ERC20Mintable.Contract.ERC20MintableCaller.contract.Call(opts, result, method, params...) 984 } 985 986 // Transfer initiates a plain transaction to move funds to the contract, calling 987 // its default method if one is available. 988 func (_ERC20Mintable *ERC20MintableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 989 return _ERC20Mintable.Contract.ERC20MintableTransactor.contract.Transfer(opts) 990 } 991 992 // Transact invokes the (paid) contract method with params as input values. 993 func (_ERC20Mintable *ERC20MintableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 994 return _ERC20Mintable.Contract.ERC20MintableTransactor.contract.Transact(opts, method, params...) 995 } 996 997 // Call invokes the (constant) contract method with params as input values and 998 // sets the output to result. The result type might be a single field for simple 999 // returns, a slice of interfaces for anonymous returns and a struct for named 1000 // returns. 1001 func (_ERC20Mintable *ERC20MintableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 1002 return _ERC20Mintable.Contract.contract.Call(opts, result, method, params...) 1003 } 1004 1005 // Transfer initiates a plain transaction to move funds to the contract, calling 1006 // its default method if one is available. 1007 func (_ERC20Mintable *ERC20MintableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 1008 return _ERC20Mintable.Contract.contract.Transfer(opts) 1009 } 1010 1011 // Transact invokes the (paid) contract method with params as input values. 1012 func (_ERC20Mintable *ERC20MintableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 1013 return _ERC20Mintable.Contract.contract.Transact(opts, method, params...) 1014 } 1015 1016 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1017 // 1018 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 1019 func (_ERC20Mintable *ERC20MintableCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 1020 var ( 1021 ret0 = new(*big.Int) 1022 ) 1023 out := ret0 1024 err := _ERC20Mintable.contract.Call(opts, out, "allowance", owner, spender) 1025 return *ret0, err 1026 } 1027 1028 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1029 // 1030 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 1031 func (_ERC20Mintable *ERC20MintableSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 1032 return _ERC20Mintable.Contract.Allowance(&_ERC20Mintable.CallOpts, owner, spender) 1033 } 1034 1035 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1036 // 1037 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 1038 func (_ERC20Mintable *ERC20MintableCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 1039 return _ERC20Mintable.Contract.Allowance(&_ERC20Mintable.CallOpts, owner, spender) 1040 } 1041 1042 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1043 // 1044 // Solidity: function balanceOf(address account) constant returns(uint256) 1045 func (_ERC20Mintable *ERC20MintableCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 1046 var ( 1047 ret0 = new(*big.Int) 1048 ) 1049 out := ret0 1050 err := _ERC20Mintable.contract.Call(opts, out, "balanceOf", account) 1051 return *ret0, err 1052 } 1053 1054 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1055 // 1056 // Solidity: function balanceOf(address account) constant returns(uint256) 1057 func (_ERC20Mintable *ERC20MintableSession) BalanceOf(account common.Address) (*big.Int, error) { 1058 return _ERC20Mintable.Contract.BalanceOf(&_ERC20Mintable.CallOpts, account) 1059 } 1060 1061 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1062 // 1063 // Solidity: function balanceOf(address account) constant returns(uint256) 1064 func (_ERC20Mintable *ERC20MintableCallerSession) BalanceOf(account common.Address) (*big.Int, error) { 1065 return _ERC20Mintable.Contract.BalanceOf(&_ERC20Mintable.CallOpts, account) 1066 } 1067 1068 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 1069 // 1070 // Solidity: function isMinter(address account) constant returns(bool) 1071 func (_ERC20Mintable *ERC20MintableCaller) IsMinter(opts *bind.CallOpts, account common.Address) (bool, error) { 1072 var ( 1073 ret0 = new(bool) 1074 ) 1075 out := ret0 1076 err := _ERC20Mintable.contract.Call(opts, out, "isMinter", account) 1077 return *ret0, err 1078 } 1079 1080 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 1081 // 1082 // Solidity: function isMinter(address account) constant returns(bool) 1083 func (_ERC20Mintable *ERC20MintableSession) IsMinter(account common.Address) (bool, error) { 1084 return _ERC20Mintable.Contract.IsMinter(&_ERC20Mintable.CallOpts, account) 1085 } 1086 1087 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 1088 // 1089 // Solidity: function isMinter(address account) constant returns(bool) 1090 func (_ERC20Mintable *ERC20MintableCallerSession) IsMinter(account common.Address) (bool, error) { 1091 return _ERC20Mintable.Contract.IsMinter(&_ERC20Mintable.CallOpts, account) 1092 } 1093 1094 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1095 // 1096 // Solidity: function totalSupply() constant returns(uint256) 1097 func (_ERC20Mintable *ERC20MintableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 1098 var ( 1099 ret0 = new(*big.Int) 1100 ) 1101 out := ret0 1102 err := _ERC20Mintable.contract.Call(opts, out, "totalSupply") 1103 return *ret0, err 1104 } 1105 1106 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1107 // 1108 // Solidity: function totalSupply() constant returns(uint256) 1109 func (_ERC20Mintable *ERC20MintableSession) TotalSupply() (*big.Int, error) { 1110 return _ERC20Mintable.Contract.TotalSupply(&_ERC20Mintable.CallOpts) 1111 } 1112 1113 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1114 // 1115 // Solidity: function totalSupply() constant returns(uint256) 1116 func (_ERC20Mintable *ERC20MintableCallerSession) TotalSupply() (*big.Int, error) { 1117 return _ERC20Mintable.Contract.TotalSupply(&_ERC20Mintable.CallOpts) 1118 } 1119 1120 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 1121 // 1122 // Solidity: function addMinter(address account) returns() 1123 func (_ERC20Mintable *ERC20MintableTransactor) AddMinter(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { 1124 return _ERC20Mintable.contract.Transact(opts, "addMinter", account) 1125 } 1126 1127 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 1128 // 1129 // Solidity: function addMinter(address account) returns() 1130 func (_ERC20Mintable *ERC20MintableSession) AddMinter(account common.Address) (*types.Transaction, error) { 1131 return _ERC20Mintable.Contract.AddMinter(&_ERC20Mintable.TransactOpts, account) 1132 } 1133 1134 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 1135 // 1136 // Solidity: function addMinter(address account) returns() 1137 func (_ERC20Mintable *ERC20MintableTransactorSession) AddMinter(account common.Address) (*types.Transaction, error) { 1138 return _ERC20Mintable.Contract.AddMinter(&_ERC20Mintable.TransactOpts, account) 1139 } 1140 1141 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1142 // 1143 // Solidity: function approve(address spender, uint256 amount) returns(bool) 1144 func (_ERC20Mintable *ERC20MintableTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { 1145 return _ERC20Mintable.contract.Transact(opts, "approve", spender, amount) 1146 } 1147 1148 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1149 // 1150 // Solidity: function approve(address spender, uint256 amount) returns(bool) 1151 func (_ERC20Mintable *ERC20MintableSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 1152 return _ERC20Mintable.Contract.Approve(&_ERC20Mintable.TransactOpts, spender, amount) 1153 } 1154 1155 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1156 // 1157 // Solidity: function approve(address spender, uint256 amount) returns(bool) 1158 func (_ERC20Mintable *ERC20MintableTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 1159 return _ERC20Mintable.Contract.Approve(&_ERC20Mintable.TransactOpts, spender, amount) 1160 } 1161 1162 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1163 // 1164 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1165 func (_ERC20Mintable *ERC20MintableTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1166 return _ERC20Mintable.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 1167 } 1168 1169 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1170 // 1171 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1172 func (_ERC20Mintable *ERC20MintableSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1173 return _ERC20Mintable.Contract.DecreaseAllowance(&_ERC20Mintable.TransactOpts, spender, subtractedValue) 1174 } 1175 1176 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1177 // 1178 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1179 func (_ERC20Mintable *ERC20MintableTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1180 return _ERC20Mintable.Contract.DecreaseAllowance(&_ERC20Mintable.TransactOpts, spender, subtractedValue) 1181 } 1182 1183 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1184 // 1185 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1186 func (_ERC20Mintable *ERC20MintableTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1187 return _ERC20Mintable.contract.Transact(opts, "increaseAllowance", spender, addedValue) 1188 } 1189 1190 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1191 // 1192 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1193 func (_ERC20Mintable *ERC20MintableSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1194 return _ERC20Mintable.Contract.IncreaseAllowance(&_ERC20Mintable.TransactOpts, spender, addedValue) 1195 } 1196 1197 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1198 // 1199 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1200 func (_ERC20Mintable *ERC20MintableTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1201 return _ERC20Mintable.Contract.IncreaseAllowance(&_ERC20Mintable.TransactOpts, spender, addedValue) 1202 } 1203 1204 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 1205 // 1206 // Solidity: function mint(address account, uint256 amount) returns(bool) 1207 func (_ERC20Mintable *ERC20MintableTransactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { 1208 return _ERC20Mintable.contract.Transact(opts, "mint", account, amount) 1209 } 1210 1211 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 1212 // 1213 // Solidity: function mint(address account, uint256 amount) returns(bool) 1214 func (_ERC20Mintable *ERC20MintableSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { 1215 return _ERC20Mintable.Contract.Mint(&_ERC20Mintable.TransactOpts, account, amount) 1216 } 1217 1218 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 1219 // 1220 // Solidity: function mint(address account, uint256 amount) returns(bool) 1221 func (_ERC20Mintable *ERC20MintableTransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { 1222 return _ERC20Mintable.Contract.Mint(&_ERC20Mintable.TransactOpts, account, amount) 1223 } 1224 1225 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 1226 // 1227 // Solidity: function renounceMinter() returns() 1228 func (_ERC20Mintable *ERC20MintableTransactor) RenounceMinter(opts *bind.TransactOpts) (*types.Transaction, error) { 1229 return _ERC20Mintable.contract.Transact(opts, "renounceMinter") 1230 } 1231 1232 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 1233 // 1234 // Solidity: function renounceMinter() returns() 1235 func (_ERC20Mintable *ERC20MintableSession) RenounceMinter() (*types.Transaction, error) { 1236 return _ERC20Mintable.Contract.RenounceMinter(&_ERC20Mintable.TransactOpts) 1237 } 1238 1239 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 1240 // 1241 // Solidity: function renounceMinter() returns() 1242 func (_ERC20Mintable *ERC20MintableTransactorSession) RenounceMinter() (*types.Transaction, error) { 1243 return _ERC20Mintable.Contract.RenounceMinter(&_ERC20Mintable.TransactOpts) 1244 } 1245 1246 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1247 // 1248 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1249 func (_ERC20Mintable *ERC20MintableTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1250 return _ERC20Mintable.contract.Transact(opts, "transfer", recipient, amount) 1251 } 1252 1253 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1254 // 1255 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1256 func (_ERC20Mintable *ERC20MintableSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1257 return _ERC20Mintable.Contract.Transfer(&_ERC20Mintable.TransactOpts, recipient, amount) 1258 } 1259 1260 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1261 // 1262 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1263 func (_ERC20Mintable *ERC20MintableTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1264 return _ERC20Mintable.Contract.Transfer(&_ERC20Mintable.TransactOpts, recipient, amount) 1265 } 1266 1267 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 1268 // 1269 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 1270 func (_ERC20Mintable *ERC20MintableTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1271 return _ERC20Mintable.contract.Transact(opts, "transferFrom", sender, recipient, amount) 1272 } 1273 1274 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 1275 // 1276 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 1277 func (_ERC20Mintable *ERC20MintableSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1278 return _ERC20Mintable.Contract.TransferFrom(&_ERC20Mintable.TransactOpts, sender, recipient, amount) 1279 } 1280 1281 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 1282 // 1283 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 1284 func (_ERC20Mintable *ERC20MintableTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1285 return _ERC20Mintable.Contract.TransferFrom(&_ERC20Mintable.TransactOpts, sender, recipient, amount) 1286 } 1287 1288 // ERC20MintableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Mintable contract. 1289 type ERC20MintableApprovalIterator struct { 1290 Event *ERC20MintableApproval // Event containing the contract specifics and raw log 1291 1292 contract *bind.BoundContract // Generic contract to use for unpacking event data 1293 event string // Event name to use for unpacking event data 1294 1295 logs chan types.Log // Log channel receiving the found contract events 1296 sub ethereum.Subscription // Subscription for errors, completion and termination 1297 done bool // Whether the subscription completed delivering logs 1298 fail error // Occurred error to stop iteration 1299 } 1300 1301 // Next advances the iterator to the subsequent event, returning whether there 1302 // are any more events found. In case of a retrieval or parsing error, false is 1303 // returned and Error() can be queried for the exact failure. 1304 func (it *ERC20MintableApprovalIterator) Next() bool { 1305 // If the iterator failed, stop iterating 1306 if it.fail != nil { 1307 return false 1308 } 1309 // If the iterator completed, deliver directly whatever's available 1310 if it.done { 1311 select { 1312 case log := <-it.logs: 1313 it.Event = new(ERC20MintableApproval) 1314 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1315 it.fail = err 1316 return false 1317 } 1318 it.Event.Raw = log 1319 return true 1320 1321 default: 1322 return false 1323 } 1324 } 1325 // Iterator still in progress, wait for either a data or an error event 1326 select { 1327 case log := <-it.logs: 1328 it.Event = new(ERC20MintableApproval) 1329 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1330 it.fail = err 1331 return false 1332 } 1333 it.Event.Raw = log 1334 return true 1335 1336 case err := <-it.sub.Err(): 1337 it.done = true 1338 it.fail = err 1339 return it.Next() 1340 } 1341 } 1342 1343 // Error returns any retrieval or parsing error occurred during filtering. 1344 func (it *ERC20MintableApprovalIterator) Error() error { 1345 return it.fail 1346 } 1347 1348 // Close terminates the iteration process, releasing any pending underlying 1349 // resources. 1350 func (it *ERC20MintableApprovalIterator) Close() error { 1351 it.sub.Unsubscribe() 1352 return nil 1353 } 1354 1355 // ERC20MintableApproval represents a Approval event raised by the ERC20Mintable contract. 1356 type ERC20MintableApproval struct { 1357 Owner common.Address 1358 Spender common.Address 1359 Value *big.Int 1360 Raw types.Log // Blockchain specific contextual infos 1361 } 1362 1363 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 1364 // 1365 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 1366 func (_ERC20Mintable *ERC20MintableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20MintableApprovalIterator, error) { 1367 1368 var ownerRule []interface{} 1369 for _, ownerItem := range owner { 1370 ownerRule = append(ownerRule, ownerItem) 1371 } 1372 var spenderRule []interface{} 1373 for _, spenderItem := range spender { 1374 spenderRule = append(spenderRule, spenderItem) 1375 } 1376 1377 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 1378 if err != nil { 1379 return nil, err 1380 } 1381 return &ERC20MintableApprovalIterator{contract: _ERC20Mintable.contract, event: "Approval", logs: logs, sub: sub}, nil 1382 } 1383 1384 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 1385 // 1386 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 1387 func (_ERC20Mintable *ERC20MintableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20MintableApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 1388 1389 var ownerRule []interface{} 1390 for _, ownerItem := range owner { 1391 ownerRule = append(ownerRule, ownerItem) 1392 } 1393 var spenderRule []interface{} 1394 for _, spenderItem := range spender { 1395 spenderRule = append(spenderRule, spenderItem) 1396 } 1397 1398 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 1399 if err != nil { 1400 return nil, err 1401 } 1402 return event.NewSubscription(func(quit <-chan struct{}) error { 1403 defer sub.Unsubscribe() 1404 for { 1405 select { 1406 case log := <-logs: 1407 // New log arrived, parse the event and forward to the user 1408 event := new(ERC20MintableApproval) 1409 if err := _ERC20Mintable.contract.UnpackLog(event, "Approval", log); err != nil { 1410 return err 1411 } 1412 event.Raw = log 1413 1414 select { 1415 case sink <- event: 1416 case err := <-sub.Err(): 1417 return err 1418 case <-quit: 1419 return nil 1420 } 1421 case err := <-sub.Err(): 1422 return err 1423 case <-quit: 1424 return nil 1425 } 1426 } 1427 }), nil 1428 } 1429 1430 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 1431 // 1432 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 1433 func (_ERC20Mintable *ERC20MintableFilterer) ParseApproval(log types.Log) (*ERC20MintableApproval, error) { 1434 event := new(ERC20MintableApproval) 1435 if err := _ERC20Mintable.contract.UnpackLog(event, "Approval", log); err != nil { 1436 return nil, err 1437 } 1438 return event, nil 1439 } 1440 1441 // ERC20MintableMinterAddedIterator is returned from FilterMinterAdded and is used to iterate over the raw logs and unpacked data for MinterAdded events raised by the ERC20Mintable contract. 1442 type ERC20MintableMinterAddedIterator struct { 1443 Event *ERC20MintableMinterAdded // Event containing the contract specifics and raw log 1444 1445 contract *bind.BoundContract // Generic contract to use for unpacking event data 1446 event string // Event name to use for unpacking event data 1447 1448 logs chan types.Log // Log channel receiving the found contract events 1449 sub ethereum.Subscription // Subscription for errors, completion and termination 1450 done bool // Whether the subscription completed delivering logs 1451 fail error // Occurred error to stop iteration 1452 } 1453 1454 // Next advances the iterator to the subsequent event, returning whether there 1455 // are any more events found. In case of a retrieval or parsing error, false is 1456 // returned and Error() can be queried for the exact failure. 1457 func (it *ERC20MintableMinterAddedIterator) Next() bool { 1458 // If the iterator failed, stop iterating 1459 if it.fail != nil { 1460 return false 1461 } 1462 // If the iterator completed, deliver directly whatever's available 1463 if it.done { 1464 select { 1465 case log := <-it.logs: 1466 it.Event = new(ERC20MintableMinterAdded) 1467 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1468 it.fail = err 1469 return false 1470 } 1471 it.Event.Raw = log 1472 return true 1473 1474 default: 1475 return false 1476 } 1477 } 1478 // Iterator still in progress, wait for either a data or an error event 1479 select { 1480 case log := <-it.logs: 1481 it.Event = new(ERC20MintableMinterAdded) 1482 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1483 it.fail = err 1484 return false 1485 } 1486 it.Event.Raw = log 1487 return true 1488 1489 case err := <-it.sub.Err(): 1490 it.done = true 1491 it.fail = err 1492 return it.Next() 1493 } 1494 } 1495 1496 // Error returns any retrieval or parsing error occurred during filtering. 1497 func (it *ERC20MintableMinterAddedIterator) Error() error { 1498 return it.fail 1499 } 1500 1501 // Close terminates the iteration process, releasing any pending underlying 1502 // resources. 1503 func (it *ERC20MintableMinterAddedIterator) Close() error { 1504 it.sub.Unsubscribe() 1505 return nil 1506 } 1507 1508 // ERC20MintableMinterAdded represents a MinterAdded event raised by the ERC20Mintable contract. 1509 type ERC20MintableMinterAdded struct { 1510 Account common.Address 1511 Raw types.Log // Blockchain specific contextual infos 1512 } 1513 1514 // FilterMinterAdded is a free log retrieval operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 1515 // 1516 // Solidity: event MinterAdded(address indexed account) 1517 func (_ERC20Mintable *ERC20MintableFilterer) FilterMinterAdded(opts *bind.FilterOpts, account []common.Address) (*ERC20MintableMinterAddedIterator, error) { 1518 1519 var accountRule []interface{} 1520 for _, accountItem := range account { 1521 accountRule = append(accountRule, accountItem) 1522 } 1523 1524 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "MinterAdded", accountRule) 1525 if err != nil { 1526 return nil, err 1527 } 1528 return &ERC20MintableMinterAddedIterator{contract: _ERC20Mintable.contract, event: "MinterAdded", logs: logs, sub: sub}, nil 1529 } 1530 1531 // WatchMinterAdded is a free log subscription operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 1532 // 1533 // Solidity: event MinterAdded(address indexed account) 1534 func (_ERC20Mintable *ERC20MintableFilterer) WatchMinterAdded(opts *bind.WatchOpts, sink chan<- *ERC20MintableMinterAdded, account []common.Address) (event.Subscription, error) { 1535 1536 var accountRule []interface{} 1537 for _, accountItem := range account { 1538 accountRule = append(accountRule, accountItem) 1539 } 1540 1541 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "MinterAdded", accountRule) 1542 if err != nil { 1543 return nil, err 1544 } 1545 return event.NewSubscription(func(quit <-chan struct{}) error { 1546 defer sub.Unsubscribe() 1547 for { 1548 select { 1549 case log := <-logs: 1550 // New log arrived, parse the event and forward to the user 1551 event := new(ERC20MintableMinterAdded) 1552 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterAdded", log); err != nil { 1553 return err 1554 } 1555 event.Raw = log 1556 1557 select { 1558 case sink <- event: 1559 case err := <-sub.Err(): 1560 return err 1561 case <-quit: 1562 return nil 1563 } 1564 case err := <-sub.Err(): 1565 return err 1566 case <-quit: 1567 return nil 1568 } 1569 } 1570 }), nil 1571 } 1572 1573 // ParseMinterAdded is a log parse operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 1574 // 1575 // Solidity: event MinterAdded(address indexed account) 1576 func (_ERC20Mintable *ERC20MintableFilterer) ParseMinterAdded(log types.Log) (*ERC20MintableMinterAdded, error) { 1577 event := new(ERC20MintableMinterAdded) 1578 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterAdded", log); err != nil { 1579 return nil, err 1580 } 1581 return event, nil 1582 } 1583 1584 // ERC20MintableMinterRemovedIterator is returned from FilterMinterRemoved and is used to iterate over the raw logs and unpacked data for MinterRemoved events raised by the ERC20Mintable contract. 1585 type ERC20MintableMinterRemovedIterator struct { 1586 Event *ERC20MintableMinterRemoved // Event containing the contract specifics and raw log 1587 1588 contract *bind.BoundContract // Generic contract to use for unpacking event data 1589 event string // Event name to use for unpacking event data 1590 1591 logs chan types.Log // Log channel receiving the found contract events 1592 sub ethereum.Subscription // Subscription for errors, completion and termination 1593 done bool // Whether the subscription completed delivering logs 1594 fail error // Occurred error to stop iteration 1595 } 1596 1597 // Next advances the iterator to the subsequent event, returning whether there 1598 // are any more events found. In case of a retrieval or parsing error, false is 1599 // returned and Error() can be queried for the exact failure. 1600 func (it *ERC20MintableMinterRemovedIterator) Next() bool { 1601 // If the iterator failed, stop iterating 1602 if it.fail != nil { 1603 return false 1604 } 1605 // If the iterator completed, deliver directly whatever's available 1606 if it.done { 1607 select { 1608 case log := <-it.logs: 1609 it.Event = new(ERC20MintableMinterRemoved) 1610 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1611 it.fail = err 1612 return false 1613 } 1614 it.Event.Raw = log 1615 return true 1616 1617 default: 1618 return false 1619 } 1620 } 1621 // Iterator still in progress, wait for either a data or an error event 1622 select { 1623 case log := <-it.logs: 1624 it.Event = new(ERC20MintableMinterRemoved) 1625 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1626 it.fail = err 1627 return false 1628 } 1629 it.Event.Raw = log 1630 return true 1631 1632 case err := <-it.sub.Err(): 1633 it.done = true 1634 it.fail = err 1635 return it.Next() 1636 } 1637 } 1638 1639 // Error returns any retrieval or parsing error occurred during filtering. 1640 func (it *ERC20MintableMinterRemovedIterator) Error() error { 1641 return it.fail 1642 } 1643 1644 // Close terminates the iteration process, releasing any pending underlying 1645 // resources. 1646 func (it *ERC20MintableMinterRemovedIterator) Close() error { 1647 it.sub.Unsubscribe() 1648 return nil 1649 } 1650 1651 // ERC20MintableMinterRemoved represents a MinterRemoved event raised by the ERC20Mintable contract. 1652 type ERC20MintableMinterRemoved struct { 1653 Account common.Address 1654 Raw types.Log // Blockchain specific contextual infos 1655 } 1656 1657 // FilterMinterRemoved is a free log retrieval operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 1658 // 1659 // Solidity: event MinterRemoved(address indexed account) 1660 func (_ERC20Mintable *ERC20MintableFilterer) FilterMinterRemoved(opts *bind.FilterOpts, account []common.Address) (*ERC20MintableMinterRemovedIterator, error) { 1661 1662 var accountRule []interface{} 1663 for _, accountItem := range account { 1664 accountRule = append(accountRule, accountItem) 1665 } 1666 1667 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "MinterRemoved", accountRule) 1668 if err != nil { 1669 return nil, err 1670 } 1671 return &ERC20MintableMinterRemovedIterator{contract: _ERC20Mintable.contract, event: "MinterRemoved", logs: logs, sub: sub}, nil 1672 } 1673 1674 // WatchMinterRemoved is a free log subscription operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 1675 // 1676 // Solidity: event MinterRemoved(address indexed account) 1677 func (_ERC20Mintable *ERC20MintableFilterer) WatchMinterRemoved(opts *bind.WatchOpts, sink chan<- *ERC20MintableMinterRemoved, account []common.Address) (event.Subscription, error) { 1678 1679 var accountRule []interface{} 1680 for _, accountItem := range account { 1681 accountRule = append(accountRule, accountItem) 1682 } 1683 1684 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "MinterRemoved", accountRule) 1685 if err != nil { 1686 return nil, err 1687 } 1688 return event.NewSubscription(func(quit <-chan struct{}) error { 1689 defer sub.Unsubscribe() 1690 for { 1691 select { 1692 case log := <-logs: 1693 // New log arrived, parse the event and forward to the user 1694 event := new(ERC20MintableMinterRemoved) 1695 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 1696 return err 1697 } 1698 event.Raw = log 1699 1700 select { 1701 case sink <- event: 1702 case err := <-sub.Err(): 1703 return err 1704 case <-quit: 1705 return nil 1706 } 1707 case err := <-sub.Err(): 1708 return err 1709 case <-quit: 1710 return nil 1711 } 1712 } 1713 }), nil 1714 } 1715 1716 // ParseMinterRemoved is a log parse operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 1717 // 1718 // Solidity: event MinterRemoved(address indexed account) 1719 func (_ERC20Mintable *ERC20MintableFilterer) ParseMinterRemoved(log types.Log) (*ERC20MintableMinterRemoved, error) { 1720 event := new(ERC20MintableMinterRemoved) 1721 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 1722 return nil, err 1723 } 1724 return event, nil 1725 } 1726 1727 // ERC20MintableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Mintable contract. 1728 type ERC20MintableTransferIterator struct { 1729 Event *ERC20MintableTransfer // Event containing the contract specifics and raw log 1730 1731 contract *bind.BoundContract // Generic contract to use for unpacking event data 1732 event string // Event name to use for unpacking event data 1733 1734 logs chan types.Log // Log channel receiving the found contract events 1735 sub ethereum.Subscription // Subscription for errors, completion and termination 1736 done bool // Whether the subscription completed delivering logs 1737 fail error // Occurred error to stop iteration 1738 } 1739 1740 // Next advances the iterator to the subsequent event, returning whether there 1741 // are any more events found. In case of a retrieval or parsing error, false is 1742 // returned and Error() can be queried for the exact failure. 1743 func (it *ERC20MintableTransferIterator) Next() bool { 1744 // If the iterator failed, stop iterating 1745 if it.fail != nil { 1746 return false 1747 } 1748 // If the iterator completed, deliver directly whatever's available 1749 if it.done { 1750 select { 1751 case log := <-it.logs: 1752 it.Event = new(ERC20MintableTransfer) 1753 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1754 it.fail = err 1755 return false 1756 } 1757 it.Event.Raw = log 1758 return true 1759 1760 default: 1761 return false 1762 } 1763 } 1764 // Iterator still in progress, wait for either a data or an error event 1765 select { 1766 case log := <-it.logs: 1767 it.Event = new(ERC20MintableTransfer) 1768 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1769 it.fail = err 1770 return false 1771 } 1772 it.Event.Raw = log 1773 return true 1774 1775 case err := <-it.sub.Err(): 1776 it.done = true 1777 it.fail = err 1778 return it.Next() 1779 } 1780 } 1781 1782 // Error returns any retrieval or parsing error occurred during filtering. 1783 func (it *ERC20MintableTransferIterator) Error() error { 1784 return it.fail 1785 } 1786 1787 // Close terminates the iteration process, releasing any pending underlying 1788 // resources. 1789 func (it *ERC20MintableTransferIterator) Close() error { 1790 it.sub.Unsubscribe() 1791 return nil 1792 } 1793 1794 // ERC20MintableTransfer represents a Transfer event raised by the ERC20Mintable contract. 1795 type ERC20MintableTransfer struct { 1796 From common.Address 1797 To common.Address 1798 Value *big.Int 1799 Raw types.Log // Blockchain specific contextual infos 1800 } 1801 1802 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1803 // 1804 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1805 func (_ERC20Mintable *ERC20MintableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20MintableTransferIterator, error) { 1806 1807 var fromRule []interface{} 1808 for _, fromItem := range from { 1809 fromRule = append(fromRule, fromItem) 1810 } 1811 var toRule []interface{} 1812 for _, toItem := range to { 1813 toRule = append(toRule, toItem) 1814 } 1815 1816 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 1817 if err != nil { 1818 return nil, err 1819 } 1820 return &ERC20MintableTransferIterator{contract: _ERC20Mintable.contract, event: "Transfer", logs: logs, sub: sub}, nil 1821 } 1822 1823 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1824 // 1825 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1826 func (_ERC20Mintable *ERC20MintableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20MintableTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 1827 1828 var fromRule []interface{} 1829 for _, fromItem := range from { 1830 fromRule = append(fromRule, fromItem) 1831 } 1832 var toRule []interface{} 1833 for _, toItem := range to { 1834 toRule = append(toRule, toItem) 1835 } 1836 1837 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 1838 if err != nil { 1839 return nil, err 1840 } 1841 return event.NewSubscription(func(quit <-chan struct{}) error { 1842 defer sub.Unsubscribe() 1843 for { 1844 select { 1845 case log := <-logs: 1846 // New log arrived, parse the event and forward to the user 1847 event := new(ERC20MintableTransfer) 1848 if err := _ERC20Mintable.contract.UnpackLog(event, "Transfer", log); err != nil { 1849 return err 1850 } 1851 event.Raw = log 1852 1853 select { 1854 case sink <- event: 1855 case err := <-sub.Err(): 1856 return err 1857 case <-quit: 1858 return nil 1859 } 1860 case err := <-sub.Err(): 1861 return err 1862 case <-quit: 1863 return nil 1864 } 1865 } 1866 }), nil 1867 } 1868 1869 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1870 // 1871 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1872 func (_ERC20Mintable *ERC20MintableFilterer) ParseTransfer(log types.Log) (*ERC20MintableTransfer, error) { 1873 event := new(ERC20MintableTransfer) 1874 if err := _ERC20Mintable.contract.UnpackLog(event, "Transfer", log); err != nil { 1875 return nil, err 1876 } 1877 return event, nil 1878 } 1879 1880 // IERC20ABI is the input ABI used to generate the binding from. 1881 const IERC20ABI = "[{\"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\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 1882 1883 // IERC20FuncSigs maps the 4-byte function signature to its string representation. 1884 var IERC20FuncSigs = map[string]string{ 1885 "dd62ed3e": "allowance(address,address)", 1886 "095ea7b3": "approve(address,uint256)", 1887 "70a08231": "balanceOf(address)", 1888 "18160ddd": "totalSupply()", 1889 "a9059cbb": "transfer(address,uint256)", 1890 "23b872dd": "transferFrom(address,address,uint256)", 1891 } 1892 1893 // IERC20 is an auto generated Go binding around an Ethereum contract. 1894 type IERC20 struct { 1895 IERC20Caller // Read-only binding to the contract 1896 IERC20Transactor // Write-only binding to the contract 1897 IERC20Filterer // Log filterer for contract events 1898 } 1899 1900 // IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. 1901 type IERC20Caller struct { 1902 contract *bind.BoundContract // Generic contract wrapper for the low level calls 1903 } 1904 1905 // IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. 1906 type IERC20Transactor struct { 1907 contract *bind.BoundContract // Generic contract wrapper for the low level calls 1908 } 1909 1910 // IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. 1911 type IERC20Filterer struct { 1912 contract *bind.BoundContract // Generic contract wrapper for the low level calls 1913 } 1914 1915 // IERC20Session is an auto generated Go binding around an Ethereum contract, 1916 // with pre-set call and transact options. 1917 type IERC20Session struct { 1918 Contract *IERC20 // Generic contract binding to set the session for 1919 CallOpts bind.CallOpts // Call options to use throughout this session 1920 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 1921 } 1922 1923 // IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, 1924 // with pre-set call options. 1925 type IERC20CallerSession struct { 1926 Contract *IERC20Caller // Generic contract caller binding to set the session for 1927 CallOpts bind.CallOpts // Call options to use throughout this session 1928 } 1929 1930 // IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, 1931 // with pre-set transact options. 1932 type IERC20TransactorSession struct { 1933 Contract *IERC20Transactor // Generic contract transactor binding to set the session for 1934 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 1935 } 1936 1937 // IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. 1938 type IERC20Raw struct { 1939 Contract *IERC20 // Generic contract binding to access the raw methods on 1940 } 1941 1942 // IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 1943 type IERC20CallerRaw struct { 1944 Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on 1945 } 1946 1947 // IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 1948 type IERC20TransactorRaw struct { 1949 Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on 1950 } 1951 1952 // NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. 1953 func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { 1954 contract, err := bindIERC20(address, backend, backend, backend) 1955 if err != nil { 1956 return nil, err 1957 } 1958 return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil 1959 } 1960 1961 // NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. 1962 func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { 1963 contract, err := bindIERC20(address, caller, nil, nil) 1964 if err != nil { 1965 return nil, err 1966 } 1967 return &IERC20Caller{contract: contract}, nil 1968 } 1969 1970 // NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. 1971 func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { 1972 contract, err := bindIERC20(address, nil, transactor, nil) 1973 if err != nil { 1974 return nil, err 1975 } 1976 return &IERC20Transactor{contract: contract}, nil 1977 } 1978 1979 // NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. 1980 func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { 1981 contract, err := bindIERC20(address, nil, nil, filterer) 1982 if err != nil { 1983 return nil, err 1984 } 1985 return &IERC20Filterer{contract: contract}, nil 1986 } 1987 1988 // bindIERC20 binds a generic wrapper to an already deployed contract. 1989 func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 1990 parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) 1991 if err != nil { 1992 return nil, err 1993 } 1994 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 1995 } 1996 1997 // Call invokes the (constant) contract method with params as input values and 1998 // sets the output to result. The result type might be a single field for simple 1999 // returns, a slice of interfaces for anonymous returns and a struct for named 2000 // returns. 2001 func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 2002 return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...) 2003 } 2004 2005 // Transfer initiates a plain transaction to move funds to the contract, calling 2006 // its default method if one is available. 2007 func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 2008 return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) 2009 } 2010 2011 // Transact invokes the (paid) contract method with params as input values. 2012 func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 2013 return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...) 2014 } 2015 2016 // Call invokes the (constant) contract method with params as input values and 2017 // sets the output to result. The result type might be a single field for simple 2018 // returns, a slice of interfaces for anonymous returns and a struct for named 2019 // returns. 2020 func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 2021 return _IERC20.Contract.contract.Call(opts, result, method, params...) 2022 } 2023 2024 // Transfer initiates a plain transaction to move funds to the contract, calling 2025 // its default method if one is available. 2026 func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 2027 return _IERC20.Contract.contract.Transfer(opts) 2028 } 2029 2030 // Transact invokes the (paid) contract method with params as input values. 2031 func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 2032 return _IERC20.Contract.contract.Transact(opts, method, params...) 2033 } 2034 2035 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 2036 // 2037 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 2038 func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 2039 var ( 2040 ret0 = new(*big.Int) 2041 ) 2042 out := ret0 2043 err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) 2044 return *ret0, err 2045 } 2046 2047 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 2048 // 2049 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 2050 func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 2051 return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) 2052 } 2053 2054 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 2055 // 2056 // Solidity: function allowance(address owner, address spender) constant returns(uint256) 2057 func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 2058 return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) 2059 } 2060 2061 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 2062 // 2063 // Solidity: function balanceOf(address account) constant returns(uint256) 2064 func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 2065 var ( 2066 ret0 = new(*big.Int) 2067 ) 2068 out := ret0 2069 err := _IERC20.contract.Call(opts, out, "balanceOf", account) 2070 return *ret0, err 2071 } 2072 2073 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 2074 // 2075 // Solidity: function balanceOf(address account) constant returns(uint256) 2076 func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { 2077 return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) 2078 } 2079 2080 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 2081 // 2082 // Solidity: function balanceOf(address account) constant returns(uint256) 2083 func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { 2084 return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) 2085 } 2086 2087 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 2088 // 2089 // Solidity: function totalSupply() constant returns(uint256) 2090 func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 2091 var ( 2092 ret0 = new(*big.Int) 2093 ) 2094 out := ret0 2095 err := _IERC20.contract.Call(opts, out, "totalSupply") 2096 return *ret0, err 2097 } 2098 2099 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 2100 // 2101 // Solidity: function totalSupply() constant returns(uint256) 2102 func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { 2103 return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) 2104 } 2105 2106 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 2107 // 2108 // Solidity: function totalSupply() constant returns(uint256) 2109 func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { 2110 return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) 2111 } 2112 2113 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 2114 // 2115 // Solidity: function approve(address spender, uint256 amount) returns(bool) 2116 func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { 2117 return _IERC20.contract.Transact(opts, "approve", spender, amount) 2118 } 2119 2120 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 2121 // 2122 // Solidity: function approve(address spender, uint256 amount) returns(bool) 2123 func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 2124 return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) 2125 } 2126 2127 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 2128 // 2129 // Solidity: function approve(address spender, uint256 amount) returns(bool) 2130 func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 2131 return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) 2132 } 2133 2134 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 2135 // 2136 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 2137 func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2138 return _IERC20.contract.Transact(opts, "transfer", recipient, amount) 2139 } 2140 2141 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 2142 // 2143 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 2144 func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2145 return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) 2146 } 2147 2148 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 2149 // 2150 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 2151 func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2152 return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) 2153 } 2154 2155 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 2156 // 2157 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 2158 func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2159 return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) 2160 } 2161 2162 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 2163 // 2164 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 2165 func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2166 return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) 2167 } 2168 2169 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 2170 // 2171 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 2172 func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2173 return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) 2174 } 2175 2176 // IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. 2177 type IERC20ApprovalIterator struct { 2178 Event *IERC20Approval // Event containing the contract specifics and raw log 2179 2180 contract *bind.BoundContract // Generic contract to use for unpacking event data 2181 event string // Event name to use for unpacking event data 2182 2183 logs chan types.Log // Log channel receiving the found contract events 2184 sub ethereum.Subscription // Subscription for errors, completion and termination 2185 done bool // Whether the subscription completed delivering logs 2186 fail error // Occurred error to stop iteration 2187 } 2188 2189 // Next advances the iterator to the subsequent event, returning whether there 2190 // are any more events found. In case of a retrieval or parsing error, false is 2191 // returned and Error() can be queried for the exact failure. 2192 func (it *IERC20ApprovalIterator) Next() bool { 2193 // If the iterator failed, stop iterating 2194 if it.fail != nil { 2195 return false 2196 } 2197 // If the iterator completed, deliver directly whatever's available 2198 if it.done { 2199 select { 2200 case log := <-it.logs: 2201 it.Event = new(IERC20Approval) 2202 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2203 it.fail = err 2204 return false 2205 } 2206 it.Event.Raw = log 2207 return true 2208 2209 default: 2210 return false 2211 } 2212 } 2213 // Iterator still in progress, wait for either a data or an error event 2214 select { 2215 case log := <-it.logs: 2216 it.Event = new(IERC20Approval) 2217 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2218 it.fail = err 2219 return false 2220 } 2221 it.Event.Raw = log 2222 return true 2223 2224 case err := <-it.sub.Err(): 2225 it.done = true 2226 it.fail = err 2227 return it.Next() 2228 } 2229 } 2230 2231 // Error returns any retrieval or parsing error occurred during filtering. 2232 func (it *IERC20ApprovalIterator) Error() error { 2233 return it.fail 2234 } 2235 2236 // Close terminates the iteration process, releasing any pending underlying 2237 // resources. 2238 func (it *IERC20ApprovalIterator) Close() error { 2239 it.sub.Unsubscribe() 2240 return nil 2241 } 2242 2243 // IERC20Approval represents a Approval event raised by the IERC20 contract. 2244 type IERC20Approval struct { 2245 Owner common.Address 2246 Spender common.Address 2247 Value *big.Int 2248 Raw types.Log // Blockchain specific contextual infos 2249 } 2250 2251 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 2252 // 2253 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 2254 func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { 2255 2256 var ownerRule []interface{} 2257 for _, ownerItem := range owner { 2258 ownerRule = append(ownerRule, ownerItem) 2259 } 2260 var spenderRule []interface{} 2261 for _, spenderItem := range spender { 2262 spenderRule = append(spenderRule, spenderItem) 2263 } 2264 2265 logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 2266 if err != nil { 2267 return nil, err 2268 } 2269 return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil 2270 } 2271 2272 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 2273 // 2274 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 2275 func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 2276 2277 var ownerRule []interface{} 2278 for _, ownerItem := range owner { 2279 ownerRule = append(ownerRule, ownerItem) 2280 } 2281 var spenderRule []interface{} 2282 for _, spenderItem := range spender { 2283 spenderRule = append(spenderRule, spenderItem) 2284 } 2285 2286 logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 2287 if err != nil { 2288 return nil, err 2289 } 2290 return event.NewSubscription(func(quit <-chan struct{}) error { 2291 defer sub.Unsubscribe() 2292 for { 2293 select { 2294 case log := <-logs: 2295 // New log arrived, parse the event and forward to the user 2296 event := new(IERC20Approval) 2297 if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { 2298 return err 2299 } 2300 event.Raw = log 2301 2302 select { 2303 case sink <- event: 2304 case err := <-sub.Err(): 2305 return err 2306 case <-quit: 2307 return nil 2308 } 2309 case err := <-sub.Err(): 2310 return err 2311 case <-quit: 2312 return nil 2313 } 2314 } 2315 }), nil 2316 } 2317 2318 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 2319 // 2320 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 2321 func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { 2322 event := new(IERC20Approval) 2323 if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { 2324 return nil, err 2325 } 2326 return event, nil 2327 } 2328 2329 // IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. 2330 type IERC20TransferIterator struct { 2331 Event *IERC20Transfer // Event containing the contract specifics and raw log 2332 2333 contract *bind.BoundContract // Generic contract to use for unpacking event data 2334 event string // Event name to use for unpacking event data 2335 2336 logs chan types.Log // Log channel receiving the found contract events 2337 sub ethereum.Subscription // Subscription for errors, completion and termination 2338 done bool // Whether the subscription completed delivering logs 2339 fail error // Occurred error to stop iteration 2340 } 2341 2342 // Next advances the iterator to the subsequent event, returning whether there 2343 // are any more events found. In case of a retrieval or parsing error, false is 2344 // returned and Error() can be queried for the exact failure. 2345 func (it *IERC20TransferIterator) Next() bool { 2346 // If the iterator failed, stop iterating 2347 if it.fail != nil { 2348 return false 2349 } 2350 // If the iterator completed, deliver directly whatever's available 2351 if it.done { 2352 select { 2353 case log := <-it.logs: 2354 it.Event = new(IERC20Transfer) 2355 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2356 it.fail = err 2357 return false 2358 } 2359 it.Event.Raw = log 2360 return true 2361 2362 default: 2363 return false 2364 } 2365 } 2366 // Iterator still in progress, wait for either a data or an error event 2367 select { 2368 case log := <-it.logs: 2369 it.Event = new(IERC20Transfer) 2370 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2371 it.fail = err 2372 return false 2373 } 2374 it.Event.Raw = log 2375 return true 2376 2377 case err := <-it.sub.Err(): 2378 it.done = true 2379 it.fail = err 2380 return it.Next() 2381 } 2382 } 2383 2384 // Error returns any retrieval or parsing error occurred during filtering. 2385 func (it *IERC20TransferIterator) Error() error { 2386 return it.fail 2387 } 2388 2389 // Close terminates the iteration process, releasing any pending underlying 2390 // resources. 2391 func (it *IERC20TransferIterator) Close() error { 2392 it.sub.Unsubscribe() 2393 return nil 2394 } 2395 2396 // IERC20Transfer represents a Transfer event raised by the IERC20 contract. 2397 type IERC20Transfer struct { 2398 From common.Address 2399 To common.Address 2400 Value *big.Int 2401 Raw types.Log // Blockchain specific contextual infos 2402 } 2403 2404 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 2405 // 2406 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 2407 func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { 2408 2409 var fromRule []interface{} 2410 for _, fromItem := range from { 2411 fromRule = append(fromRule, fromItem) 2412 } 2413 var toRule []interface{} 2414 for _, toItem := range to { 2415 toRule = append(toRule, toItem) 2416 } 2417 2418 logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 2419 if err != nil { 2420 return nil, err 2421 } 2422 return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil 2423 } 2424 2425 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 2426 // 2427 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 2428 func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { 2429 2430 var fromRule []interface{} 2431 for _, fromItem := range from { 2432 fromRule = append(fromRule, fromItem) 2433 } 2434 var toRule []interface{} 2435 for _, toItem := range to { 2436 toRule = append(toRule, toItem) 2437 } 2438 2439 logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 2440 if err != nil { 2441 return nil, err 2442 } 2443 return event.NewSubscription(func(quit <-chan struct{}) error { 2444 defer sub.Unsubscribe() 2445 for { 2446 select { 2447 case log := <-logs: 2448 // New log arrived, parse the event and forward to the user 2449 event := new(IERC20Transfer) 2450 if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 2451 return err 2452 } 2453 event.Raw = log 2454 2455 select { 2456 case sink <- event: 2457 case err := <-sub.Err(): 2458 return err 2459 case <-quit: 2460 return nil 2461 } 2462 case err := <-sub.Err(): 2463 return err 2464 case <-quit: 2465 return nil 2466 } 2467 } 2468 }), nil 2469 } 2470 2471 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 2472 // 2473 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 2474 func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { 2475 event := new(IERC20Transfer) 2476 if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 2477 return nil, err 2478 } 2479 return event, nil 2480 } 2481 2482 // MinterRoleABI is the input ABI used to generate the binding from. 2483 const MinterRoleABI = "[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterRemoved\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 2484 2485 // MinterRoleFuncSigs maps the 4-byte function signature to its string representation. 2486 var MinterRoleFuncSigs = map[string]string{ 2487 "983b2d56": "addMinter(address)", 2488 "aa271e1a": "isMinter(address)", 2489 "98650275": "renounceMinter()", 2490 } 2491 2492 // MinterRole is an auto generated Go binding around an Ethereum contract. 2493 type MinterRole struct { 2494 MinterRoleCaller // Read-only binding to the contract 2495 MinterRoleTransactor // Write-only binding to the contract 2496 MinterRoleFilterer // Log filterer for contract events 2497 } 2498 2499 // MinterRoleCaller is an auto generated read-only Go binding around an Ethereum contract. 2500 type MinterRoleCaller struct { 2501 contract *bind.BoundContract // Generic contract wrapper for the low level calls 2502 } 2503 2504 // MinterRoleTransactor is an auto generated write-only Go binding around an Ethereum contract. 2505 type MinterRoleTransactor struct { 2506 contract *bind.BoundContract // Generic contract wrapper for the low level calls 2507 } 2508 2509 // MinterRoleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 2510 type MinterRoleFilterer struct { 2511 contract *bind.BoundContract // Generic contract wrapper for the low level calls 2512 } 2513 2514 // MinterRoleSession is an auto generated Go binding around an Ethereum contract, 2515 // with pre-set call and transact options. 2516 type MinterRoleSession struct { 2517 Contract *MinterRole // Generic contract binding to set the session for 2518 CallOpts bind.CallOpts // Call options to use throughout this session 2519 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 2520 } 2521 2522 // MinterRoleCallerSession is an auto generated read-only Go binding around an Ethereum contract, 2523 // with pre-set call options. 2524 type MinterRoleCallerSession struct { 2525 Contract *MinterRoleCaller // Generic contract caller binding to set the session for 2526 CallOpts bind.CallOpts // Call options to use throughout this session 2527 } 2528 2529 // MinterRoleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 2530 // with pre-set transact options. 2531 type MinterRoleTransactorSession struct { 2532 Contract *MinterRoleTransactor // Generic contract transactor binding to set the session for 2533 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 2534 } 2535 2536 // MinterRoleRaw is an auto generated low-level Go binding around an Ethereum contract. 2537 type MinterRoleRaw struct { 2538 Contract *MinterRole // Generic contract binding to access the raw methods on 2539 } 2540 2541 // MinterRoleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 2542 type MinterRoleCallerRaw struct { 2543 Contract *MinterRoleCaller // Generic read-only contract binding to access the raw methods on 2544 } 2545 2546 // MinterRoleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 2547 type MinterRoleTransactorRaw struct { 2548 Contract *MinterRoleTransactor // Generic write-only contract binding to access the raw methods on 2549 } 2550 2551 // NewMinterRole creates a new instance of MinterRole, bound to a specific deployed contract. 2552 func NewMinterRole(address common.Address, backend bind.ContractBackend) (*MinterRole, error) { 2553 contract, err := bindMinterRole(address, backend, backend, backend) 2554 if err != nil { 2555 return nil, err 2556 } 2557 return &MinterRole{MinterRoleCaller: MinterRoleCaller{contract: contract}, MinterRoleTransactor: MinterRoleTransactor{contract: contract}, MinterRoleFilterer: MinterRoleFilterer{contract: contract}}, nil 2558 } 2559 2560 // NewMinterRoleCaller creates a new read-only instance of MinterRole, bound to a specific deployed contract. 2561 func NewMinterRoleCaller(address common.Address, caller bind.ContractCaller) (*MinterRoleCaller, error) { 2562 contract, err := bindMinterRole(address, caller, nil, nil) 2563 if err != nil { 2564 return nil, err 2565 } 2566 return &MinterRoleCaller{contract: contract}, nil 2567 } 2568 2569 // NewMinterRoleTransactor creates a new write-only instance of MinterRole, bound to a specific deployed contract. 2570 func NewMinterRoleTransactor(address common.Address, transactor bind.ContractTransactor) (*MinterRoleTransactor, error) { 2571 contract, err := bindMinterRole(address, nil, transactor, nil) 2572 if err != nil { 2573 return nil, err 2574 } 2575 return &MinterRoleTransactor{contract: contract}, nil 2576 } 2577 2578 // NewMinterRoleFilterer creates a new log filterer instance of MinterRole, bound to a specific deployed contract. 2579 func NewMinterRoleFilterer(address common.Address, filterer bind.ContractFilterer) (*MinterRoleFilterer, error) { 2580 contract, err := bindMinterRole(address, nil, nil, filterer) 2581 if err != nil { 2582 return nil, err 2583 } 2584 return &MinterRoleFilterer{contract: contract}, nil 2585 } 2586 2587 // bindMinterRole binds a generic wrapper to an already deployed contract. 2588 func bindMinterRole(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 2589 parsed, err := abi.JSON(strings.NewReader(MinterRoleABI)) 2590 if err != nil { 2591 return nil, err 2592 } 2593 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 2594 } 2595 2596 // Call invokes the (constant) contract method with params as input values and 2597 // sets the output to result. The result type might be a single field for simple 2598 // returns, a slice of interfaces for anonymous returns and a struct for named 2599 // returns. 2600 func (_MinterRole *MinterRoleRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 2601 return _MinterRole.Contract.MinterRoleCaller.contract.Call(opts, result, method, params...) 2602 } 2603 2604 // Transfer initiates a plain transaction to move funds to the contract, calling 2605 // its default method if one is available. 2606 func (_MinterRole *MinterRoleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 2607 return _MinterRole.Contract.MinterRoleTransactor.contract.Transfer(opts) 2608 } 2609 2610 // Transact invokes the (paid) contract method with params as input values. 2611 func (_MinterRole *MinterRoleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 2612 return _MinterRole.Contract.MinterRoleTransactor.contract.Transact(opts, method, params...) 2613 } 2614 2615 // Call invokes the (constant) contract method with params as input values and 2616 // sets the output to result. The result type might be a single field for simple 2617 // returns, a slice of interfaces for anonymous returns and a struct for named 2618 // returns. 2619 func (_MinterRole *MinterRoleCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 2620 return _MinterRole.Contract.contract.Call(opts, result, method, params...) 2621 } 2622 2623 // Transfer initiates a plain transaction to move funds to the contract, calling 2624 // its default method if one is available. 2625 func (_MinterRole *MinterRoleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 2626 return _MinterRole.Contract.contract.Transfer(opts) 2627 } 2628 2629 // Transact invokes the (paid) contract method with params as input values. 2630 func (_MinterRole *MinterRoleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 2631 return _MinterRole.Contract.contract.Transact(opts, method, params...) 2632 } 2633 2634 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 2635 // 2636 // Solidity: function isMinter(address account) constant returns(bool) 2637 func (_MinterRole *MinterRoleCaller) IsMinter(opts *bind.CallOpts, account common.Address) (bool, error) { 2638 var ( 2639 ret0 = new(bool) 2640 ) 2641 out := ret0 2642 err := _MinterRole.contract.Call(opts, out, "isMinter", account) 2643 return *ret0, err 2644 } 2645 2646 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 2647 // 2648 // Solidity: function isMinter(address account) constant returns(bool) 2649 func (_MinterRole *MinterRoleSession) IsMinter(account common.Address) (bool, error) { 2650 return _MinterRole.Contract.IsMinter(&_MinterRole.CallOpts, account) 2651 } 2652 2653 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 2654 // 2655 // Solidity: function isMinter(address account) constant returns(bool) 2656 func (_MinterRole *MinterRoleCallerSession) IsMinter(account common.Address) (bool, error) { 2657 return _MinterRole.Contract.IsMinter(&_MinterRole.CallOpts, account) 2658 } 2659 2660 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 2661 // 2662 // Solidity: function addMinter(address account) returns() 2663 func (_MinterRole *MinterRoleTransactor) AddMinter(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { 2664 return _MinterRole.contract.Transact(opts, "addMinter", account) 2665 } 2666 2667 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 2668 // 2669 // Solidity: function addMinter(address account) returns() 2670 func (_MinterRole *MinterRoleSession) AddMinter(account common.Address) (*types.Transaction, error) { 2671 return _MinterRole.Contract.AddMinter(&_MinterRole.TransactOpts, account) 2672 } 2673 2674 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 2675 // 2676 // Solidity: function addMinter(address account) returns() 2677 func (_MinterRole *MinterRoleTransactorSession) AddMinter(account common.Address) (*types.Transaction, error) { 2678 return _MinterRole.Contract.AddMinter(&_MinterRole.TransactOpts, account) 2679 } 2680 2681 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 2682 // 2683 // Solidity: function renounceMinter() returns() 2684 func (_MinterRole *MinterRoleTransactor) RenounceMinter(opts *bind.TransactOpts) (*types.Transaction, error) { 2685 return _MinterRole.contract.Transact(opts, "renounceMinter") 2686 } 2687 2688 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 2689 // 2690 // Solidity: function renounceMinter() returns() 2691 func (_MinterRole *MinterRoleSession) RenounceMinter() (*types.Transaction, error) { 2692 return _MinterRole.Contract.RenounceMinter(&_MinterRole.TransactOpts) 2693 } 2694 2695 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 2696 // 2697 // Solidity: function renounceMinter() returns() 2698 func (_MinterRole *MinterRoleTransactorSession) RenounceMinter() (*types.Transaction, error) { 2699 return _MinterRole.Contract.RenounceMinter(&_MinterRole.TransactOpts) 2700 } 2701 2702 // MinterRoleMinterAddedIterator is returned from FilterMinterAdded and is used to iterate over the raw logs and unpacked data for MinterAdded events raised by the MinterRole contract. 2703 type MinterRoleMinterAddedIterator struct { 2704 Event *MinterRoleMinterAdded // Event containing the contract specifics and raw log 2705 2706 contract *bind.BoundContract // Generic contract to use for unpacking event data 2707 event string // Event name to use for unpacking event data 2708 2709 logs chan types.Log // Log channel receiving the found contract events 2710 sub ethereum.Subscription // Subscription for errors, completion and termination 2711 done bool // Whether the subscription completed delivering logs 2712 fail error // Occurred error to stop iteration 2713 } 2714 2715 // Next advances the iterator to the subsequent event, returning whether there 2716 // are any more events found. In case of a retrieval or parsing error, false is 2717 // returned and Error() can be queried for the exact failure. 2718 func (it *MinterRoleMinterAddedIterator) Next() bool { 2719 // If the iterator failed, stop iterating 2720 if it.fail != nil { 2721 return false 2722 } 2723 // If the iterator completed, deliver directly whatever's available 2724 if it.done { 2725 select { 2726 case log := <-it.logs: 2727 it.Event = new(MinterRoleMinterAdded) 2728 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2729 it.fail = err 2730 return false 2731 } 2732 it.Event.Raw = log 2733 return true 2734 2735 default: 2736 return false 2737 } 2738 } 2739 // Iterator still in progress, wait for either a data or an error event 2740 select { 2741 case log := <-it.logs: 2742 it.Event = new(MinterRoleMinterAdded) 2743 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2744 it.fail = err 2745 return false 2746 } 2747 it.Event.Raw = log 2748 return true 2749 2750 case err := <-it.sub.Err(): 2751 it.done = true 2752 it.fail = err 2753 return it.Next() 2754 } 2755 } 2756 2757 // Error returns any retrieval or parsing error occurred during filtering. 2758 func (it *MinterRoleMinterAddedIterator) Error() error { 2759 return it.fail 2760 } 2761 2762 // Close terminates the iteration process, releasing any pending underlying 2763 // resources. 2764 func (it *MinterRoleMinterAddedIterator) Close() error { 2765 it.sub.Unsubscribe() 2766 return nil 2767 } 2768 2769 // MinterRoleMinterAdded represents a MinterAdded event raised by the MinterRole contract. 2770 type MinterRoleMinterAdded struct { 2771 Account common.Address 2772 Raw types.Log // Blockchain specific contextual infos 2773 } 2774 2775 // FilterMinterAdded is a free log retrieval operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 2776 // 2777 // Solidity: event MinterAdded(address indexed account) 2778 func (_MinterRole *MinterRoleFilterer) FilterMinterAdded(opts *bind.FilterOpts, account []common.Address) (*MinterRoleMinterAddedIterator, error) { 2779 2780 var accountRule []interface{} 2781 for _, accountItem := range account { 2782 accountRule = append(accountRule, accountItem) 2783 } 2784 2785 logs, sub, err := _MinterRole.contract.FilterLogs(opts, "MinterAdded", accountRule) 2786 if err != nil { 2787 return nil, err 2788 } 2789 return &MinterRoleMinterAddedIterator{contract: _MinterRole.contract, event: "MinterAdded", logs: logs, sub: sub}, nil 2790 } 2791 2792 // WatchMinterAdded is a free log subscription operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 2793 // 2794 // Solidity: event MinterAdded(address indexed account) 2795 func (_MinterRole *MinterRoleFilterer) WatchMinterAdded(opts *bind.WatchOpts, sink chan<- *MinterRoleMinterAdded, account []common.Address) (event.Subscription, error) { 2796 2797 var accountRule []interface{} 2798 for _, accountItem := range account { 2799 accountRule = append(accountRule, accountItem) 2800 } 2801 2802 logs, sub, err := _MinterRole.contract.WatchLogs(opts, "MinterAdded", accountRule) 2803 if err != nil { 2804 return nil, err 2805 } 2806 return event.NewSubscription(func(quit <-chan struct{}) error { 2807 defer sub.Unsubscribe() 2808 for { 2809 select { 2810 case log := <-logs: 2811 // New log arrived, parse the event and forward to the user 2812 event := new(MinterRoleMinterAdded) 2813 if err := _MinterRole.contract.UnpackLog(event, "MinterAdded", log); err != nil { 2814 return err 2815 } 2816 event.Raw = log 2817 2818 select { 2819 case sink <- event: 2820 case err := <-sub.Err(): 2821 return err 2822 case <-quit: 2823 return nil 2824 } 2825 case err := <-sub.Err(): 2826 return err 2827 case <-quit: 2828 return nil 2829 } 2830 } 2831 }), nil 2832 } 2833 2834 // ParseMinterAdded is a log parse operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 2835 // 2836 // Solidity: event MinterAdded(address indexed account) 2837 func (_MinterRole *MinterRoleFilterer) ParseMinterAdded(log types.Log) (*MinterRoleMinterAdded, error) { 2838 event := new(MinterRoleMinterAdded) 2839 if err := _MinterRole.contract.UnpackLog(event, "MinterAdded", log); err != nil { 2840 return nil, err 2841 } 2842 return event, nil 2843 } 2844 2845 // MinterRoleMinterRemovedIterator is returned from FilterMinterRemoved and is used to iterate over the raw logs and unpacked data for MinterRemoved events raised by the MinterRole contract. 2846 type MinterRoleMinterRemovedIterator struct { 2847 Event *MinterRoleMinterRemoved // Event containing the contract specifics and raw log 2848 2849 contract *bind.BoundContract // Generic contract to use for unpacking event data 2850 event string // Event name to use for unpacking event data 2851 2852 logs chan types.Log // Log channel receiving the found contract events 2853 sub ethereum.Subscription // Subscription for errors, completion and termination 2854 done bool // Whether the subscription completed delivering logs 2855 fail error // Occurred error to stop iteration 2856 } 2857 2858 // Next advances the iterator to the subsequent event, returning whether there 2859 // are any more events found. In case of a retrieval or parsing error, false is 2860 // returned and Error() can be queried for the exact failure. 2861 func (it *MinterRoleMinterRemovedIterator) Next() bool { 2862 // If the iterator failed, stop iterating 2863 if it.fail != nil { 2864 return false 2865 } 2866 // If the iterator completed, deliver directly whatever's available 2867 if it.done { 2868 select { 2869 case log := <-it.logs: 2870 it.Event = new(MinterRoleMinterRemoved) 2871 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2872 it.fail = err 2873 return false 2874 } 2875 it.Event.Raw = log 2876 return true 2877 2878 default: 2879 return false 2880 } 2881 } 2882 // Iterator still in progress, wait for either a data or an error event 2883 select { 2884 case log := <-it.logs: 2885 it.Event = new(MinterRoleMinterRemoved) 2886 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2887 it.fail = err 2888 return false 2889 } 2890 it.Event.Raw = log 2891 return true 2892 2893 case err := <-it.sub.Err(): 2894 it.done = true 2895 it.fail = err 2896 return it.Next() 2897 } 2898 } 2899 2900 // Error returns any retrieval or parsing error occurred during filtering. 2901 func (it *MinterRoleMinterRemovedIterator) Error() error { 2902 return it.fail 2903 } 2904 2905 // Close terminates the iteration process, releasing any pending underlying 2906 // resources. 2907 func (it *MinterRoleMinterRemovedIterator) Close() error { 2908 it.sub.Unsubscribe() 2909 return nil 2910 } 2911 2912 // MinterRoleMinterRemoved represents a MinterRemoved event raised by the MinterRole contract. 2913 type MinterRoleMinterRemoved struct { 2914 Account common.Address 2915 Raw types.Log // Blockchain specific contextual infos 2916 } 2917 2918 // FilterMinterRemoved is a free log retrieval operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 2919 // 2920 // Solidity: event MinterRemoved(address indexed account) 2921 func (_MinterRole *MinterRoleFilterer) FilterMinterRemoved(opts *bind.FilterOpts, account []common.Address) (*MinterRoleMinterRemovedIterator, error) { 2922 2923 var accountRule []interface{} 2924 for _, accountItem := range account { 2925 accountRule = append(accountRule, accountItem) 2926 } 2927 2928 logs, sub, err := _MinterRole.contract.FilterLogs(opts, "MinterRemoved", accountRule) 2929 if err != nil { 2930 return nil, err 2931 } 2932 return &MinterRoleMinterRemovedIterator{contract: _MinterRole.contract, event: "MinterRemoved", logs: logs, sub: sub}, nil 2933 } 2934 2935 // WatchMinterRemoved is a free log subscription operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 2936 // 2937 // Solidity: event MinterRemoved(address indexed account) 2938 func (_MinterRole *MinterRoleFilterer) WatchMinterRemoved(opts *bind.WatchOpts, sink chan<- *MinterRoleMinterRemoved, account []common.Address) (event.Subscription, error) { 2939 2940 var accountRule []interface{} 2941 for _, accountItem := range account { 2942 accountRule = append(accountRule, accountItem) 2943 } 2944 2945 logs, sub, err := _MinterRole.contract.WatchLogs(opts, "MinterRemoved", accountRule) 2946 if err != nil { 2947 return nil, err 2948 } 2949 return event.NewSubscription(func(quit <-chan struct{}) error { 2950 defer sub.Unsubscribe() 2951 for { 2952 select { 2953 case log := <-logs: 2954 // New log arrived, parse the event and forward to the user 2955 event := new(MinterRoleMinterRemoved) 2956 if err := _MinterRole.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 2957 return err 2958 } 2959 event.Raw = log 2960 2961 select { 2962 case sink <- event: 2963 case err := <-sub.Err(): 2964 return err 2965 case <-quit: 2966 return nil 2967 } 2968 case err := <-sub.Err(): 2969 return err 2970 case <-quit: 2971 return nil 2972 } 2973 } 2974 }), nil 2975 } 2976 2977 // ParseMinterRemoved is a log parse operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 2978 // 2979 // Solidity: event MinterRemoved(address indexed account) 2980 func (_MinterRole *MinterRoleFilterer) ParseMinterRemoved(log types.Log) (*MinterRoleMinterRemoved, error) { 2981 event := new(MinterRoleMinterRemoved) 2982 if err := _MinterRole.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 2983 return nil, err 2984 } 2985 return event, nil 2986 } 2987 2988 // RolesABI is the input ABI used to generate the binding from. 2989 const RolesABI = "[]" 2990 2991 // RolesBin is the compiled bytecode used for deploying new contracts. 2992 var RolesBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820451a2112c879141f72bbe0ec00d853511a9d98646af7e3081d90a3d70270eb1564736f6c634300050c0032" 2993 2994 // DeployRoles deploys a new Ethereum contract, binding an instance of Roles to it. 2995 func DeployRoles(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Roles, error) { 2996 parsed, err := abi.JSON(strings.NewReader(RolesABI)) 2997 if err != nil { 2998 return common.Address{}, nil, nil, err 2999 } 3000 3001 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(RolesBin), backend) 3002 if err != nil { 3003 return common.Address{}, nil, nil, err 3004 } 3005 return address, tx, &Roles{RolesCaller: RolesCaller{contract: contract}, RolesTransactor: RolesTransactor{contract: contract}, RolesFilterer: RolesFilterer{contract: contract}}, nil 3006 } 3007 3008 // Roles is an auto generated Go binding around an Ethereum contract. 3009 type Roles struct { 3010 RolesCaller // Read-only binding to the contract 3011 RolesTransactor // Write-only binding to the contract 3012 RolesFilterer // Log filterer for contract events 3013 } 3014 3015 // RolesCaller is an auto generated read-only Go binding around an Ethereum contract. 3016 type RolesCaller struct { 3017 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3018 } 3019 3020 // RolesTransactor is an auto generated write-only Go binding around an Ethereum contract. 3021 type RolesTransactor struct { 3022 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3023 } 3024 3025 // RolesFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 3026 type RolesFilterer struct { 3027 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3028 } 3029 3030 // RolesSession is an auto generated Go binding around an Ethereum contract, 3031 // with pre-set call and transact options. 3032 type RolesSession struct { 3033 Contract *Roles // Generic contract binding to set the session for 3034 CallOpts bind.CallOpts // Call options to use throughout this session 3035 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 3036 } 3037 3038 // RolesCallerSession is an auto generated read-only Go binding around an Ethereum contract, 3039 // with pre-set call options. 3040 type RolesCallerSession struct { 3041 Contract *RolesCaller // Generic contract caller binding to set the session for 3042 CallOpts bind.CallOpts // Call options to use throughout this session 3043 } 3044 3045 // RolesTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 3046 // with pre-set transact options. 3047 type RolesTransactorSession struct { 3048 Contract *RolesTransactor // Generic contract transactor binding to set the session for 3049 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 3050 } 3051 3052 // RolesRaw is an auto generated low-level Go binding around an Ethereum contract. 3053 type RolesRaw struct { 3054 Contract *Roles // Generic contract binding to access the raw methods on 3055 } 3056 3057 // RolesCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 3058 type RolesCallerRaw struct { 3059 Contract *RolesCaller // Generic read-only contract binding to access the raw methods on 3060 } 3061 3062 // RolesTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 3063 type RolesTransactorRaw struct { 3064 Contract *RolesTransactor // Generic write-only contract binding to access the raw methods on 3065 } 3066 3067 // NewRoles creates a new instance of Roles, bound to a specific deployed contract. 3068 func NewRoles(address common.Address, backend bind.ContractBackend) (*Roles, error) { 3069 contract, err := bindRoles(address, backend, backend, backend) 3070 if err != nil { 3071 return nil, err 3072 } 3073 return &Roles{RolesCaller: RolesCaller{contract: contract}, RolesTransactor: RolesTransactor{contract: contract}, RolesFilterer: RolesFilterer{contract: contract}}, nil 3074 } 3075 3076 // NewRolesCaller creates a new read-only instance of Roles, bound to a specific deployed contract. 3077 func NewRolesCaller(address common.Address, caller bind.ContractCaller) (*RolesCaller, error) { 3078 contract, err := bindRoles(address, caller, nil, nil) 3079 if err != nil { 3080 return nil, err 3081 } 3082 return &RolesCaller{contract: contract}, nil 3083 } 3084 3085 // NewRolesTransactor creates a new write-only instance of Roles, bound to a specific deployed contract. 3086 func NewRolesTransactor(address common.Address, transactor bind.ContractTransactor) (*RolesTransactor, error) { 3087 contract, err := bindRoles(address, nil, transactor, nil) 3088 if err != nil { 3089 return nil, err 3090 } 3091 return &RolesTransactor{contract: contract}, nil 3092 } 3093 3094 // NewRolesFilterer creates a new log filterer instance of Roles, bound to a specific deployed contract. 3095 func NewRolesFilterer(address common.Address, filterer bind.ContractFilterer) (*RolesFilterer, error) { 3096 contract, err := bindRoles(address, nil, nil, filterer) 3097 if err != nil { 3098 return nil, err 3099 } 3100 return &RolesFilterer{contract: contract}, nil 3101 } 3102 3103 // bindRoles binds a generic wrapper to an already deployed contract. 3104 func bindRoles(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 3105 parsed, err := abi.JSON(strings.NewReader(RolesABI)) 3106 if err != nil { 3107 return nil, err 3108 } 3109 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 3110 } 3111 3112 // Call invokes the (constant) contract method with params as input values and 3113 // sets the output to result. The result type might be a single field for simple 3114 // returns, a slice of interfaces for anonymous returns and a struct for named 3115 // returns. 3116 func (_Roles *RolesRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 3117 return _Roles.Contract.RolesCaller.contract.Call(opts, result, method, params...) 3118 } 3119 3120 // Transfer initiates a plain transaction to move funds to the contract, calling 3121 // its default method if one is available. 3122 func (_Roles *RolesRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 3123 return _Roles.Contract.RolesTransactor.contract.Transfer(opts) 3124 } 3125 3126 // Transact invokes the (paid) contract method with params as input values. 3127 func (_Roles *RolesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 3128 return _Roles.Contract.RolesTransactor.contract.Transact(opts, method, params...) 3129 } 3130 3131 // Call invokes the (constant) contract method with params as input values and 3132 // sets the output to result. The result type might be a single field for simple 3133 // returns, a slice of interfaces for anonymous returns and a struct for named 3134 // returns. 3135 func (_Roles *RolesCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 3136 return _Roles.Contract.contract.Call(opts, result, method, params...) 3137 } 3138 3139 // Transfer initiates a plain transaction to move funds to the contract, calling 3140 // its default method if one is available. 3141 func (_Roles *RolesTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 3142 return _Roles.Contract.contract.Transfer(opts) 3143 } 3144 3145 // Transact invokes the (paid) contract method with params as input values. 3146 func (_Roles *RolesTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 3147 return _Roles.Contract.contract.Transact(opts, method, params...) 3148 } 3149 3150 // SafeMathABI is the input ABI used to generate the binding from. 3151 const SafeMathABI = "[]" 3152 3153 // SafeMathBin is the compiled bytecode used for deploying new contracts. 3154 var SafeMathBin = "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582045f810ccb41cd151344ccf006ddfbe7c3c58a867d26e345c6576ae09178171dc64736f6c634300050c0032" 3155 3156 // DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. 3157 func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { 3158 parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) 3159 if err != nil { 3160 return common.Address{}, nil, nil, err 3161 } 3162 3163 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) 3164 if err != nil { 3165 return common.Address{}, nil, nil, err 3166 } 3167 return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil 3168 } 3169 3170 // SafeMath is an auto generated Go binding around an Ethereum contract. 3171 type SafeMath struct { 3172 SafeMathCaller // Read-only binding to the contract 3173 SafeMathTransactor // Write-only binding to the contract 3174 SafeMathFilterer // Log filterer for contract events 3175 } 3176 3177 // SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. 3178 type SafeMathCaller struct { 3179 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3180 } 3181 3182 // SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. 3183 type SafeMathTransactor struct { 3184 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3185 } 3186 3187 // SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 3188 type SafeMathFilterer struct { 3189 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3190 } 3191 3192 // SafeMathSession is an auto generated Go binding around an Ethereum contract, 3193 // with pre-set call and transact options. 3194 type SafeMathSession struct { 3195 Contract *SafeMath // Generic contract binding to set the session for 3196 CallOpts bind.CallOpts // Call options to use throughout this session 3197 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 3198 } 3199 3200 // SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, 3201 // with pre-set call options. 3202 type SafeMathCallerSession struct { 3203 Contract *SafeMathCaller // Generic contract caller binding to set the session for 3204 CallOpts bind.CallOpts // Call options to use throughout this session 3205 } 3206 3207 // SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 3208 // with pre-set transact options. 3209 type SafeMathTransactorSession struct { 3210 Contract *SafeMathTransactor // Generic contract transactor binding to set the session for 3211 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 3212 } 3213 3214 // SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. 3215 type SafeMathRaw struct { 3216 Contract *SafeMath // Generic contract binding to access the raw methods on 3217 } 3218 3219 // SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 3220 type SafeMathCallerRaw struct { 3221 Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on 3222 } 3223 3224 // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 3225 type SafeMathTransactorRaw struct { 3226 Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on 3227 } 3228 3229 // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. 3230 func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { 3231 contract, err := bindSafeMath(address, backend, backend, backend) 3232 if err != nil { 3233 return nil, err 3234 } 3235 return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil 3236 } 3237 3238 // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. 3239 func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { 3240 contract, err := bindSafeMath(address, caller, nil, nil) 3241 if err != nil { 3242 return nil, err 3243 } 3244 return &SafeMathCaller{contract: contract}, nil 3245 } 3246 3247 // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. 3248 func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { 3249 contract, err := bindSafeMath(address, nil, transactor, nil) 3250 if err != nil { 3251 return nil, err 3252 } 3253 return &SafeMathTransactor{contract: contract}, nil 3254 } 3255 3256 // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. 3257 func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { 3258 contract, err := bindSafeMath(address, nil, nil, filterer) 3259 if err != nil { 3260 return nil, err 3261 } 3262 return &SafeMathFilterer{contract: contract}, nil 3263 } 3264 3265 // bindSafeMath binds a generic wrapper to an already deployed contract. 3266 func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 3267 parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) 3268 if err != nil { 3269 return nil, err 3270 } 3271 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 3272 } 3273 3274 // Call invokes the (constant) contract method with params as input values and 3275 // sets the output to result. The result type might be a single field for simple 3276 // returns, a slice of interfaces for anonymous returns and a struct for named 3277 // returns. 3278 func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 3279 return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) 3280 } 3281 3282 // Transfer initiates a plain transaction to move funds to the contract, calling 3283 // its default method if one is available. 3284 func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 3285 return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) 3286 } 3287 3288 // Transact invokes the (paid) contract method with params as input values. 3289 func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 3290 return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) 3291 } 3292 3293 // Call invokes the (constant) contract method with params as input values and 3294 // sets the output to result. The result type might be a single field for simple 3295 // returns, a slice of interfaces for anonymous returns and a struct for named 3296 // returns. 3297 func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 3298 return _SafeMath.Contract.contract.Call(opts, result, method, params...) 3299 } 3300 3301 // Transfer initiates a plain transaction to move funds to the contract, calling 3302 // its default method if one is available. 3303 func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 3304 return _SafeMath.Contract.contract.Transfer(opts) 3305 } 3306 3307 // Transact invokes the (paid) contract method with params as input values. 3308 func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 3309 return _SafeMath.Contract.contract.Transact(opts, method, params...) 3310 }