github.com/klaytn/klaytn@v1.10.2/contracts/sc_erc20/sc_token.go (about) 1 // Code generated - DO NOT EDIT. 2 // This file is a generated binding and any manual changes will be lost. 3 4 package sctoken 5 6 import ( 7 "math/big" 8 "strings" 9 10 "github.com/klaytn/klaytn" 11 "github.com/klaytn/klaytn/accounts/abi" 12 "github.com/klaytn/klaytn/accounts/abi/bind" 13 "github.com/klaytn/klaytn/blockchain/types" 14 "github.com/klaytn/klaytn/common" 15 "github.com/klaytn/klaytn/event" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var ( 20 _ = big.NewInt 21 _ = strings.NewReader 22 _ = klaytn.NotFound 23 _ = bind.Bind 24 _ = common.Big1 25 _ = types.BloomLookup 26 _ = event.NewSubscription 27 ) 28 29 // AddressABI is the input ABI used to generate the binding from. 30 const AddressABI = "[]" 31 32 // AddressBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 33 const AddressBinRuntime = `73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820b7534b8b203852d9ead56352219b5abb5424533d9bb1b9cf84c0b1d15d11fee50029` 34 35 // AddressBin is the compiled bytecode used for deploying new contracts. 36 var AddressBin = "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a72305820b7534b8b203852d9ead56352219b5abb5424533d9bb1b9cf84c0b1d15d11fee50029" 37 38 // DeployAddress deploys a new Klaytn contract, binding an instance of Address to it. 39 func DeployAddress(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Address, error) { 40 parsed, err := abi.JSON(strings.NewReader(AddressABI)) 41 if err != nil { 42 return common.Address{}, nil, nil, err 43 } 44 45 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AddressBin), backend) 46 if err != nil { 47 return common.Address{}, nil, nil, err 48 } 49 return address, tx, &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil 50 } 51 52 // Address is an auto generated Go binding around a Klaytn contract. 53 type Address struct { 54 AddressCaller // Read-only binding to the contract 55 AddressTransactor // Write-only binding to the contract 56 AddressFilterer // Log filterer for contract events 57 } 58 59 // AddressCaller is an auto generated read-only Go binding around a Klaytn contract. 60 type AddressCaller struct { 61 contract *bind.BoundContract // Generic contract wrapper for the low level calls 62 } 63 64 // AddressTransactor is an auto generated write-only Go binding around a Klaytn contract. 65 type AddressTransactor struct { 66 contract *bind.BoundContract // Generic contract wrapper for the low level calls 67 } 68 69 // AddressFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 70 type AddressFilterer struct { 71 contract *bind.BoundContract // Generic contract wrapper for the low level calls 72 } 73 74 // AddressSession is an auto generated Go binding around a Klaytn contract, 75 // with pre-set call and transact options. 76 type AddressSession struct { 77 Contract *Address // Generic contract binding to set the session for 78 CallOpts bind.CallOpts // Call options to use throughout this session 79 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 80 } 81 82 // AddressCallerSession is an auto generated read-only Go binding around a Klaytn contract, 83 // with pre-set call options. 84 type AddressCallerSession struct { 85 Contract *AddressCaller // Generic contract caller binding to set the session for 86 CallOpts bind.CallOpts // Call options to use throughout this session 87 } 88 89 // AddressTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 90 // with pre-set transact options. 91 type AddressTransactorSession struct { 92 Contract *AddressTransactor // Generic contract transactor binding to set the session for 93 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 94 } 95 96 // AddressRaw is an auto generated low-level Go binding around a Klaytn contract. 97 type AddressRaw struct { 98 Contract *Address // Generic contract binding to access the raw methods on 99 } 100 101 // AddressCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 102 type AddressCallerRaw struct { 103 Contract *AddressCaller // Generic read-only contract binding to access the raw methods on 104 } 105 106 // AddressTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 107 type AddressTransactorRaw struct { 108 Contract *AddressTransactor // Generic write-only contract binding to access the raw methods on 109 } 110 111 // NewAddress creates a new instance of Address, bound to a specific deployed contract. 112 func NewAddress(address common.Address, backend bind.ContractBackend) (*Address, error) { 113 contract, err := bindAddress(address, backend, backend, backend) 114 if err != nil { 115 return nil, err 116 } 117 return &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil 118 } 119 120 // NewAddressCaller creates a new read-only instance of Address, bound to a specific deployed contract. 121 func NewAddressCaller(address common.Address, caller bind.ContractCaller) (*AddressCaller, error) { 122 contract, err := bindAddress(address, caller, nil, nil) 123 if err != nil { 124 return nil, err 125 } 126 return &AddressCaller{contract: contract}, nil 127 } 128 129 // NewAddressTransactor creates a new write-only instance of Address, bound to a specific deployed contract. 130 func NewAddressTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressTransactor, error) { 131 contract, err := bindAddress(address, nil, transactor, nil) 132 if err != nil { 133 return nil, err 134 } 135 return &AddressTransactor{contract: contract}, nil 136 } 137 138 // NewAddressFilterer creates a new log filterer instance of Address, bound to a specific deployed contract. 139 func NewAddressFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressFilterer, error) { 140 contract, err := bindAddress(address, nil, nil, filterer) 141 if err != nil { 142 return nil, err 143 } 144 return &AddressFilterer{contract: contract}, nil 145 } 146 147 // bindAddress binds a generic wrapper to an already deployed contract. 148 func bindAddress(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 149 parsed, err := abi.JSON(strings.NewReader(AddressABI)) 150 if err != nil { 151 return nil, err 152 } 153 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 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 (_Address *AddressRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 161 return _Address.Contract.AddressCaller.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 (_Address *AddressRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 167 return _Address.Contract.AddressTransactor.contract.Transfer(opts) 168 } 169 170 // Transact invokes the (paid) contract method with params as input values. 171 func (_Address *AddressRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 172 return _Address.Contract.AddressTransactor.contract.Transact(opts, method, params...) 173 } 174 175 // Call invokes the (constant) contract method with params as input values and 176 // sets the output to result. The result type might be a single field for simple 177 // returns, a slice of interfaces for anonymous returns and a struct for named 178 // returns. 179 func (_Address *AddressCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 180 return _Address.Contract.contract.Call(opts, result, method, params...) 181 } 182 183 // Transfer initiates a plain transaction to move funds to the contract, calling 184 // its default method if one is available. 185 func (_Address *AddressTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 186 return _Address.Contract.contract.Transfer(opts) 187 } 188 189 // Transact invokes the (paid) contract method with params as input values. 190 func (_Address *AddressTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 191 return _Address.Contract.contract.Transact(opts, method, params...) 192 } 193 194 // ERC20ABI is the input ABI used to generate the binding from. 195 const ERC20ABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" 196 197 // ERC20BinRuntime is the compiled bytecode used for adding genesis block without deploying code. 198 const ERC20BinRuntime = `608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d561020b565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610211565b6100b96004803603604081101561013357600080fd5b506001600160a01b038135169060200135610268565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102a4565b6100b96004803603604081101561018557600080fd5b506001600160a01b0381351690602001356102bf565b6100b9600480360360408110156101b157600080fd5b506001600160a01b0381351690602001356102fb565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610308565b6000610202338484610333565b50600192915050565b60025490565b600061021e848484610425565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461025e918691610259908663ffffffff61056d16565b610333565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff6105cd16565b6001600160a01b031660009081526020819052604090205490565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61056d16565b6000610202338484610425565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661037b57604051600160e51b62461bcd02815260040180806020018281038252602481526020018061069c6024913960400191505060405180910390fd5b6001600160a01b0382166103c357604051600160e51b62461bcd0281526004018080602001828103825260228152602001806106556022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661046d57604051600160e51b62461bcd0281526004018080602001828103825260258152602001806106776025913960400191505060405180910390fd5b6001600160a01b0382166104b557604051600160e51b62461bcd0281526004018080602001828103825260238152602001806106326023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546104de908263ffffffff61056d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610513908263ffffffff6105cd16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105c75760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561062a5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820802770bd4b0917c80d6b47964550f6c3e437f4a0b7286b55aa9963a98c5aaf400029` 199 200 // ERC20FuncSigs maps the 4-byte function signature to its string representation. 201 var ERC20FuncSigs = map[string]string{ 202 "dd62ed3e": "allowance(address,address)", 203 "095ea7b3": "approve(address,uint256)", 204 "70a08231": "balanceOf(address)", 205 "a457c2d7": "decreaseAllowance(address,uint256)", 206 "39509351": "increaseAllowance(address,uint256)", 207 "18160ddd": "totalSupply()", 208 "a9059cbb": "transfer(address,uint256)", 209 "23b872dd": "transferFrom(address,address,uint256)", 210 } 211 212 // ERC20Bin is the compiled bytecode used for deploying new contracts. 213 var ERC20Bin = "0x608060405234801561001057600080fd5b506106eb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d561020b565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610211565b6100b96004803603604081101561013357600080fd5b506001600160a01b038135169060200135610268565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102a4565b6100b96004803603604081101561018557600080fd5b506001600160a01b0381351690602001356102bf565b6100b9600480360360408110156101b157600080fd5b506001600160a01b0381351690602001356102fb565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610308565b6000610202338484610333565b50600192915050565b60025490565b600061021e848484610425565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461025e918691610259908663ffffffff61056d16565b610333565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff6105cd16565b6001600160a01b031660009081526020819052604090205490565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61056d16565b6000610202338484610425565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661037b57604051600160e51b62461bcd02815260040180806020018281038252602481526020018061069c6024913960400191505060405180910390fd5b6001600160a01b0382166103c357604051600160e51b62461bcd0281526004018080602001828103825260228152602001806106556022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661046d57604051600160e51b62461bcd0281526004018080602001828103825260258152602001806106776025913960400191505060405180910390fd5b6001600160a01b0382166104b557604051600160e51b62461bcd0281526004018080602001828103825260238152602001806106326023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546104de908263ffffffff61056d16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610513908263ffffffff6105cd16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156105c75760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561062a5760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a72305820802770bd4b0917c80d6b47964550f6c3e437f4a0b7286b55aa9963a98c5aaf400029" 214 215 // DeployERC20 deploys a new Klaytn contract, binding an instance of ERC20 to it. 216 func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20, error) { 217 parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) 218 if err != nil { 219 return common.Address{}, nil, nil, err 220 } 221 222 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend) 223 if err != nil { 224 return common.Address{}, nil, nil, err 225 } 226 return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil 227 } 228 229 // ERC20 is an auto generated Go binding around a Klaytn contract. 230 type ERC20 struct { 231 ERC20Caller // Read-only binding to the contract 232 ERC20Transactor // Write-only binding to the contract 233 ERC20Filterer // Log filterer for contract events 234 } 235 236 // ERC20Caller is an auto generated read-only Go binding around a Klaytn contract. 237 type ERC20Caller struct { 238 contract *bind.BoundContract // Generic contract wrapper for the low level calls 239 } 240 241 // ERC20Transactor is an auto generated write-only Go binding around a Klaytn contract. 242 type ERC20Transactor struct { 243 contract *bind.BoundContract // Generic contract wrapper for the low level calls 244 } 245 246 // ERC20Filterer is an auto generated log filtering Go binding around a Klaytn contract events. 247 type ERC20Filterer struct { 248 contract *bind.BoundContract // Generic contract wrapper for the low level calls 249 } 250 251 // ERC20Session is an auto generated Go binding around a Klaytn contract, 252 // with pre-set call and transact options. 253 type ERC20Session struct { 254 Contract *ERC20 // Generic contract binding to set the session for 255 CallOpts bind.CallOpts // Call options to use throughout this session 256 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 257 } 258 259 // ERC20CallerSession is an auto generated read-only Go binding around a Klaytn contract, 260 // with pre-set call options. 261 type ERC20CallerSession struct { 262 Contract *ERC20Caller // Generic contract caller binding to set the session for 263 CallOpts bind.CallOpts // Call options to use throughout this session 264 } 265 266 // ERC20TransactorSession is an auto generated write-only Go binding around a Klaytn contract, 267 // with pre-set transact options. 268 type ERC20TransactorSession struct { 269 Contract *ERC20Transactor // Generic contract transactor binding to set the session for 270 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 271 } 272 273 // ERC20Raw is an auto generated low-level Go binding around a Klaytn contract. 274 type ERC20Raw struct { 275 Contract *ERC20 // Generic contract binding to access the raw methods on 276 } 277 278 // ERC20CallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 279 type ERC20CallerRaw struct { 280 Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on 281 } 282 283 // ERC20TransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 284 type ERC20TransactorRaw struct { 285 Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on 286 } 287 288 // NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. 289 func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { 290 contract, err := bindERC20(address, backend, backend, backend) 291 if err != nil { 292 return nil, err 293 } 294 return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil 295 } 296 297 // NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. 298 func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { 299 contract, err := bindERC20(address, caller, nil, nil) 300 if err != nil { 301 return nil, err 302 } 303 return &ERC20Caller{contract: contract}, nil 304 } 305 306 // NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. 307 func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { 308 contract, err := bindERC20(address, nil, transactor, nil) 309 if err != nil { 310 return nil, err 311 } 312 return &ERC20Transactor{contract: contract}, nil 313 } 314 315 // NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. 316 func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { 317 contract, err := bindERC20(address, nil, nil, filterer) 318 if err != nil { 319 return nil, err 320 } 321 return &ERC20Filterer{contract: contract}, nil 322 } 323 324 // bindERC20 binds a generic wrapper to an already deployed contract. 325 func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 326 parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) 327 if err != nil { 328 return nil, err 329 } 330 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 331 } 332 333 // Call invokes the (constant) contract method with params as input values and 334 // sets the output to result. The result type might be a single field for simple 335 // returns, a slice of interfaces for anonymous returns and a struct for named 336 // returns. 337 func (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 338 return _ERC20.Contract.ERC20Caller.contract.Call(opts, result, method, params...) 339 } 340 341 // Transfer initiates a plain transaction to move funds to the contract, calling 342 // its default method if one is available. 343 func (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 344 return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) 345 } 346 347 // Transact invokes the (paid) contract method with params as input values. 348 func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 349 return _ERC20.Contract.ERC20Transactor.contract.Transact(opts, method, params...) 350 } 351 352 // Call invokes the (constant) contract method with params as input values and 353 // sets the output to result. The result type might be a single field for simple 354 // returns, a slice of interfaces for anonymous returns and a struct for named 355 // returns. 356 func (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 357 return _ERC20.Contract.contract.Call(opts, result, method, params...) 358 } 359 360 // Transfer initiates a plain transaction to move funds to the contract, calling 361 // its default method if one is available. 362 func (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 363 return _ERC20.Contract.contract.Transfer(opts) 364 } 365 366 // Transact invokes the (paid) contract method with params as input values. 367 func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 368 return _ERC20.Contract.contract.Transact(opts, method, params...) 369 } 370 371 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 372 // 373 // Solidity: function allowance(address owner, address spender) view returns(uint256) 374 func (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 375 var ( 376 ret0 = new(*big.Int) 377 ) 378 out := ret0 379 err := _ERC20.contract.Call(opts, out, "allowance", owner, spender) 380 return *ret0, err 381 } 382 383 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 384 // 385 // Solidity: function allowance(address owner, address spender) view returns(uint256) 386 func (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 387 return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) 388 } 389 390 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 391 // 392 // Solidity: function allowance(address owner, address spender) view returns(uint256) 393 func (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 394 return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) 395 } 396 397 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 398 // 399 // Solidity: function balanceOf(address account) view returns(uint256) 400 func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 401 var ( 402 ret0 = new(*big.Int) 403 ) 404 out := ret0 405 err := _ERC20.contract.Call(opts, out, "balanceOf", account) 406 return *ret0, err 407 } 408 409 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 410 // 411 // Solidity: function balanceOf(address account) view returns(uint256) 412 func (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { 413 return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) 414 } 415 416 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 417 // 418 // Solidity: function balanceOf(address account) view returns(uint256) 419 func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { 420 return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) 421 } 422 423 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 424 // 425 // Solidity: function totalSupply() view returns(uint256) 426 func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 427 var ( 428 ret0 = new(*big.Int) 429 ) 430 out := ret0 431 err := _ERC20.contract.Call(opts, out, "totalSupply") 432 return *ret0, err 433 } 434 435 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 436 // 437 // Solidity: function totalSupply() view returns(uint256) 438 func (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { 439 return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) 440 } 441 442 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 443 // 444 // Solidity: function totalSupply() view returns(uint256) 445 func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { 446 return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) 447 } 448 449 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 450 // 451 // Solidity: function approve(address spender, uint256 value) returns(bool) 452 func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { 453 return _ERC20.contract.Transact(opts, "approve", spender, value) 454 } 455 456 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 457 // 458 // Solidity: function approve(address spender, uint256 value) returns(bool) 459 func (_ERC20 *ERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 460 return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, value) 461 } 462 463 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 464 // 465 // Solidity: function approve(address spender, uint256 value) returns(bool) 466 func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 467 return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, value) 468 } 469 470 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 471 // 472 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 473 func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 474 return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 475 } 476 477 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 478 // 479 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 480 func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 481 return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) 482 } 483 484 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 485 // 486 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 487 func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 488 return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) 489 } 490 491 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 492 // 493 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 494 func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 495 return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) 496 } 497 498 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 499 // 500 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 501 func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 502 return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) 503 } 504 505 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 506 // 507 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 508 func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 509 return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) 510 } 511 512 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 513 // 514 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 515 func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 516 return _ERC20.contract.Transact(opts, "transfer", recipient, amount) 517 } 518 519 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 520 // 521 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 522 func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 523 return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) 524 } 525 526 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 527 // 528 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 529 func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 530 return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) 531 } 532 533 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 534 // 535 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 536 func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 537 return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) 538 } 539 540 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 541 // 542 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 543 func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 544 return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) 545 } 546 547 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 548 // 549 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 550 func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 551 return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) 552 } 553 554 // 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. 555 type ERC20ApprovalIterator struct { 556 Event *ERC20Approval // Event containing the contract specifics and raw log 557 558 contract *bind.BoundContract // Generic contract to use for unpacking event data 559 event string // Event name to use for unpacking event data 560 561 logs chan types.Log // Log channel receiving the found contract events 562 sub klaytn.Subscription // Subscription for errors, completion and termination 563 done bool // Whether the subscription completed delivering logs 564 fail error // Occurred error to stop iteration 565 } 566 567 // Next advances the iterator to the subsequent event, returning whether there 568 // are any more events found. In case of a retrieval or parsing error, false is 569 // returned and Error() can be queried for the exact failure. 570 func (it *ERC20ApprovalIterator) Next() bool { 571 // If the iterator failed, stop iterating 572 if it.fail != nil { 573 return false 574 } 575 // If the iterator completed, deliver directly whatever's available 576 if it.done { 577 select { 578 case log := <-it.logs: 579 it.Event = new(ERC20Approval) 580 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 581 it.fail = err 582 return false 583 } 584 it.Event.Raw = log 585 return true 586 587 default: 588 return false 589 } 590 } 591 // Iterator still in progress, wait for either a data or an error event 592 select { 593 case log := <-it.logs: 594 it.Event = new(ERC20Approval) 595 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 596 it.fail = err 597 return false 598 } 599 it.Event.Raw = log 600 return true 601 602 case err := <-it.sub.Err(): 603 it.done = true 604 it.fail = err 605 return it.Next() 606 } 607 } 608 609 // Error returns any retrieval or parsing error occurred during filtering. 610 func (it *ERC20ApprovalIterator) Error() error { 611 return it.fail 612 } 613 614 // Close terminates the iteration process, releasing any pending underlying 615 // resources. 616 func (it *ERC20ApprovalIterator) Close() error { 617 it.sub.Unsubscribe() 618 return nil 619 } 620 621 // ERC20Approval represents a Approval event raised by the ERC20 contract. 622 type ERC20Approval struct { 623 Owner common.Address 624 Spender common.Address 625 Value *big.Int 626 Raw types.Log // Blockchain specific contextual infos 627 } 628 629 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 630 // 631 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 632 func (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, error) { 633 634 var ownerRule []interface{} 635 for _, ownerItem := range owner { 636 ownerRule = append(ownerRule, ownerItem) 637 } 638 var spenderRule []interface{} 639 for _, spenderItem := range spender { 640 spenderRule = append(spenderRule, spenderItem) 641 } 642 643 logs, sub, err := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 644 if err != nil { 645 return nil, err 646 } 647 return &ERC20ApprovalIterator{contract: _ERC20.contract, event: "Approval", logs: logs, sub: sub}, nil 648 } 649 650 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 651 // 652 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 653 func (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 654 655 var ownerRule []interface{} 656 for _, ownerItem := range owner { 657 ownerRule = append(ownerRule, ownerItem) 658 } 659 var spenderRule []interface{} 660 for _, spenderItem := range spender { 661 spenderRule = append(spenderRule, spenderItem) 662 } 663 664 logs, sub, err := _ERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 665 if err != nil { 666 return nil, err 667 } 668 return event.NewSubscription(func(quit <-chan struct{}) error { 669 defer sub.Unsubscribe() 670 for { 671 select { 672 case log := <-logs: 673 // New log arrived, parse the event and forward to the user 674 event := new(ERC20Approval) 675 if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { 676 return err 677 } 678 event.Raw = log 679 680 select { 681 case sink <- event: 682 case err := <-sub.Err(): 683 return err 684 case <-quit: 685 return nil 686 } 687 case err := <-sub.Err(): 688 return err 689 case <-quit: 690 return nil 691 } 692 } 693 }), nil 694 } 695 696 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 697 // 698 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 699 func (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { 700 event := new(ERC20Approval) 701 if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { 702 return nil, err 703 } 704 return event, nil 705 } 706 707 // 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. 708 type ERC20TransferIterator struct { 709 Event *ERC20Transfer // Event containing the contract specifics and raw log 710 711 contract *bind.BoundContract // Generic contract to use for unpacking event data 712 event string // Event name to use for unpacking event data 713 714 logs chan types.Log // Log channel receiving the found contract events 715 sub klaytn.Subscription // Subscription for errors, completion and termination 716 done bool // Whether the subscription completed delivering logs 717 fail error // Occurred error to stop iteration 718 } 719 720 // Next advances the iterator to the subsequent event, returning whether there 721 // are any more events found. In case of a retrieval or parsing error, false is 722 // returned and Error() can be queried for the exact failure. 723 func (it *ERC20TransferIterator) Next() bool { 724 // If the iterator failed, stop iterating 725 if it.fail != nil { 726 return false 727 } 728 // If the iterator completed, deliver directly whatever's available 729 if it.done { 730 select { 731 case log := <-it.logs: 732 it.Event = new(ERC20Transfer) 733 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 734 it.fail = err 735 return false 736 } 737 it.Event.Raw = log 738 return true 739 740 default: 741 return false 742 } 743 } 744 // Iterator still in progress, wait for either a data or an error event 745 select { 746 case log := <-it.logs: 747 it.Event = new(ERC20Transfer) 748 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 749 it.fail = err 750 return false 751 } 752 it.Event.Raw = log 753 return true 754 755 case err := <-it.sub.Err(): 756 it.done = true 757 it.fail = err 758 return it.Next() 759 } 760 } 761 762 // Error returns any retrieval or parsing error occurred during filtering. 763 func (it *ERC20TransferIterator) Error() error { 764 return it.fail 765 } 766 767 // Close terminates the iteration process, releasing any pending underlying 768 // resources. 769 func (it *ERC20TransferIterator) Close() error { 770 it.sub.Unsubscribe() 771 return nil 772 } 773 774 // ERC20Transfer represents a Transfer event raised by the ERC20 contract. 775 type ERC20Transfer struct { 776 From common.Address 777 To common.Address 778 Value *big.Int 779 Raw types.Log // Blockchain specific contextual infos 780 } 781 782 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 783 // 784 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 785 func (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, error) { 786 787 var fromRule []interface{} 788 for _, fromItem := range from { 789 fromRule = append(fromRule, fromItem) 790 } 791 var toRule []interface{} 792 for _, toItem := range to { 793 toRule = append(toRule, toItem) 794 } 795 796 logs, sub, err := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 797 if err != nil { 798 return nil, err 799 } 800 return &ERC20TransferIterator{contract: _ERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil 801 } 802 803 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 804 // 805 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 806 func (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { 807 808 var fromRule []interface{} 809 for _, fromItem := range from { 810 fromRule = append(fromRule, fromItem) 811 } 812 var toRule []interface{} 813 for _, toItem := range to { 814 toRule = append(toRule, toItem) 815 } 816 817 logs, sub, err := _ERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 818 if err != nil { 819 return nil, err 820 } 821 return event.NewSubscription(func(quit <-chan struct{}) error { 822 defer sub.Unsubscribe() 823 for { 824 select { 825 case log := <-logs: 826 // New log arrived, parse the event and forward to the user 827 event := new(ERC20Transfer) 828 if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 829 return err 830 } 831 event.Raw = log 832 833 select { 834 case sink <- event: 835 case err := <-sub.Err(): 836 return err 837 case <-quit: 838 return nil 839 } 840 case err := <-sub.Err(): 841 return err 842 case <-quit: 843 return nil 844 } 845 } 846 }), nil 847 } 848 849 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 850 // 851 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 852 func (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { 853 event := new(ERC20Transfer) 854 if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 855 return nil, err 856 } 857 return event, nil 858 } 859 860 // ERC20BurnableABI is the input ABI used to generate the binding from. 861 const ERC20BurnableABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" 862 863 // ERC20BurnableBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 864 const ERC20BurnableBinRuntime = `608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a082311461017e57806379cc6790146101a4578063a457c2d7146101d0578063a9059cbb146101fc578063dd62ed3e146102285761009e565b8063095ea7b3146100a357806318160ddd146100e357806323b872dd146100fd578063395093511461013357806342966c681461015f575b600080fd5b6100cf600480360360408110156100b957600080fd5b506001600160a01b038135169060200135610256565b604080519115158252519081900360200190f35b6100eb61026c565b60408051918252519081900360200190f35b6100cf6004803603606081101561011357600080fd5b506001600160a01b03813581169160208101359091169060400135610272565b6100cf6004803603604081101561014957600080fd5b506001600160a01b0381351690602001356102c9565b61017c6004803603602081101561017557600080fd5b5035610305565b005b6100eb6004803603602081101561019457600080fd5b50356001600160a01b0316610312565b61017c600480360360408110156101ba57600080fd5b506001600160a01b03813516906020013561032d565b6100cf600480360360408110156101e657600080fd5b506001600160a01b03813516906020013561033b565b6100cf6004803603604081101561021257600080fd5b506001600160a01b038135169060200135610377565b6100eb6004803603604081101561023e57600080fd5b506001600160a01b0381358116916020013516610384565b60006102633384846103af565b50600192915050565b60025490565b600061027f8484846104a1565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546102bf9186916102ba908663ffffffff6105e916565b6103af565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102639185906102ba908663ffffffff61064916565b61030f33826106ad565b50565b6001600160a01b031660009081526020819052604090205490565b6103378282610789565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102639185906102ba908663ffffffff6105e916565b60006102633384846104a1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103f757604051600160e51b62461bcd02815260040180806020018281038252602481526020018061085a6024913960400191505060405180910390fd5b6001600160a01b03821661043f57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806107f26022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104e957604051600160e51b62461bcd0281526004018080602001828103825260258152602001806108356025913960400191505060405180910390fd5b6001600160a01b03821661053157604051600160e51b62461bcd0281526004018080602001828103825260238152602001806107cf6023913960400191505060405180910390fd5b6001600160a01b03831660009081526020819052604090205461055a908263ffffffff6105e916565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461058f908263ffffffff61064916565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156106435760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156106a65760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166106f557604051600160e51b62461bcd0281526004018080602001828103825260218152602001806108146021913960400191505060405180910390fd5b600254610708908263ffffffff6105e916565b6002556001600160a01b038216600090815260208190526040902054610734908263ffffffff6105e916565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b61079382826106ad565b6001600160a01b0382166000908152600160209081526040808320338085529252909120546103379184916102ba908563ffffffff6105e91656fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a7230582013b4ee4a596e91b545aeb6447c3788b121a99567674027b21b642c7da8dc493c0029` 865 866 // ERC20BurnableFuncSigs maps the 4-byte function signature to its string representation. 867 var ERC20BurnableFuncSigs = map[string]string{ 868 "dd62ed3e": "allowance(address,address)", 869 "095ea7b3": "approve(address,uint256)", 870 "70a08231": "balanceOf(address)", 871 "42966c68": "burn(uint256)", 872 "79cc6790": "burnFrom(address,uint256)", 873 "a457c2d7": "decreaseAllowance(address,uint256)", 874 "39509351": "increaseAllowance(address,uint256)", 875 "18160ddd": "totalSupply()", 876 "a9059cbb": "transfer(address,uint256)", 877 "23b872dd": "transferFrom(address,address,uint256)", 878 } 879 880 // ERC20BurnableBin is the compiled bytecode used for deploying new contracts. 881 var ERC20BurnableBin = "0x608060405234801561001057600080fd5b506108a9806100206000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806370a082311161006657806370a082311461017e57806379cc6790146101a4578063a457c2d7146101d0578063a9059cbb146101fc578063dd62ed3e146102285761009e565b8063095ea7b3146100a357806318160ddd146100e357806323b872dd146100fd578063395093511461013357806342966c681461015f575b600080fd5b6100cf600480360360408110156100b957600080fd5b506001600160a01b038135169060200135610256565b604080519115158252519081900360200190f35b6100eb61026c565b60408051918252519081900360200190f35b6100cf6004803603606081101561011357600080fd5b506001600160a01b03813581169160208101359091169060400135610272565b6100cf6004803603604081101561014957600080fd5b506001600160a01b0381351690602001356102c9565b61017c6004803603602081101561017557600080fd5b5035610305565b005b6100eb6004803603602081101561019457600080fd5b50356001600160a01b0316610312565b61017c600480360360408110156101ba57600080fd5b506001600160a01b03813516906020013561032d565b6100cf600480360360408110156101e657600080fd5b506001600160a01b03813516906020013561033b565b6100cf6004803603604081101561021257600080fd5b506001600160a01b038135169060200135610377565b6100eb6004803603604081101561023e57600080fd5b506001600160a01b0381358116916020013516610384565b60006102633384846103af565b50600192915050565b60025490565b600061027f8484846104a1565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546102bf9186916102ba908663ffffffff6105e916565b6103af565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102639185906102ba908663ffffffff61064916565b61030f33826106ad565b50565b6001600160a01b031660009081526020819052604090205490565b6103378282610789565b5050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102639185906102ba908663ffffffff6105e916565b60006102633384846104a1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103f757604051600160e51b62461bcd02815260040180806020018281038252602481526020018061085a6024913960400191505060405180910390fd5b6001600160a01b03821661043f57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806107f26022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166104e957604051600160e51b62461bcd0281526004018080602001828103825260258152602001806108356025913960400191505060405180910390fd5b6001600160a01b03821661053157604051600160e51b62461bcd0281526004018080602001828103825260238152602001806107cf6023913960400191505060405180910390fd5b6001600160a01b03831660009081526020819052604090205461055a908263ffffffff6105e916565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461058f908263ffffffff61064916565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000828211156106435760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156106a65760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166106f557604051600160e51b62461bcd0281526004018080602001828103825260218152602001806108146021913960400191505060405180910390fd5b600254610708908263ffffffff6105e916565b6002556001600160a01b038216600090815260208190526040902054610734908263ffffffff6105e916565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b61079382826106ad565b6001600160a01b0382166000908152600160209081526040808320338085529252909120546103379184916102ba908563ffffffff6105e91656fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a7230582013b4ee4a596e91b545aeb6447c3788b121a99567674027b21b642c7da8dc493c0029" 882 883 // DeployERC20Burnable deploys a new Klaytn contract, binding an instance of ERC20Burnable to it. 884 func DeployERC20Burnable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Burnable, error) { 885 parsed, err := abi.JSON(strings.NewReader(ERC20BurnableABI)) 886 if err != nil { 887 return common.Address{}, nil, nil, err 888 } 889 890 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20BurnableBin), backend) 891 if err != nil { 892 return common.Address{}, nil, nil, err 893 } 894 return address, tx, &ERC20Burnable{ERC20BurnableCaller: ERC20BurnableCaller{contract: contract}, ERC20BurnableTransactor: ERC20BurnableTransactor{contract: contract}, ERC20BurnableFilterer: ERC20BurnableFilterer{contract: contract}}, nil 895 } 896 897 // ERC20Burnable is an auto generated Go binding around a Klaytn contract. 898 type ERC20Burnable struct { 899 ERC20BurnableCaller // Read-only binding to the contract 900 ERC20BurnableTransactor // Write-only binding to the contract 901 ERC20BurnableFilterer // Log filterer for contract events 902 } 903 904 // ERC20BurnableCaller is an auto generated read-only Go binding around a Klaytn contract. 905 type ERC20BurnableCaller struct { 906 contract *bind.BoundContract // Generic contract wrapper for the low level calls 907 } 908 909 // ERC20BurnableTransactor is an auto generated write-only Go binding around a Klaytn contract. 910 type ERC20BurnableTransactor struct { 911 contract *bind.BoundContract // Generic contract wrapper for the low level calls 912 } 913 914 // ERC20BurnableFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 915 type ERC20BurnableFilterer struct { 916 contract *bind.BoundContract // Generic contract wrapper for the low level calls 917 } 918 919 // ERC20BurnableSession is an auto generated Go binding around a Klaytn contract, 920 // with pre-set call and transact options. 921 type ERC20BurnableSession struct { 922 Contract *ERC20Burnable // Generic contract binding to set the session for 923 CallOpts bind.CallOpts // Call options to use throughout this session 924 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 925 } 926 927 // ERC20BurnableCallerSession is an auto generated read-only Go binding around a Klaytn contract, 928 // with pre-set call options. 929 type ERC20BurnableCallerSession struct { 930 Contract *ERC20BurnableCaller // Generic contract caller binding to set the session for 931 CallOpts bind.CallOpts // Call options to use throughout this session 932 } 933 934 // ERC20BurnableTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 935 // with pre-set transact options. 936 type ERC20BurnableTransactorSession struct { 937 Contract *ERC20BurnableTransactor // Generic contract transactor binding to set the session for 938 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 939 } 940 941 // ERC20BurnableRaw is an auto generated low-level Go binding around a Klaytn contract. 942 type ERC20BurnableRaw struct { 943 Contract *ERC20Burnable // Generic contract binding to access the raw methods on 944 } 945 946 // ERC20BurnableCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 947 type ERC20BurnableCallerRaw struct { 948 Contract *ERC20BurnableCaller // Generic read-only contract binding to access the raw methods on 949 } 950 951 // ERC20BurnableTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 952 type ERC20BurnableTransactorRaw struct { 953 Contract *ERC20BurnableTransactor // Generic write-only contract binding to access the raw methods on 954 } 955 956 // NewERC20Burnable creates a new instance of ERC20Burnable, bound to a specific deployed contract. 957 func NewERC20Burnable(address common.Address, backend bind.ContractBackend) (*ERC20Burnable, error) { 958 contract, err := bindERC20Burnable(address, backend, backend, backend) 959 if err != nil { 960 return nil, err 961 } 962 return &ERC20Burnable{ERC20BurnableCaller: ERC20BurnableCaller{contract: contract}, ERC20BurnableTransactor: ERC20BurnableTransactor{contract: contract}, ERC20BurnableFilterer: ERC20BurnableFilterer{contract: contract}}, nil 963 } 964 965 // NewERC20BurnableCaller creates a new read-only instance of ERC20Burnable, bound to a specific deployed contract. 966 func NewERC20BurnableCaller(address common.Address, caller bind.ContractCaller) (*ERC20BurnableCaller, error) { 967 contract, err := bindERC20Burnable(address, caller, nil, nil) 968 if err != nil { 969 return nil, err 970 } 971 return &ERC20BurnableCaller{contract: contract}, nil 972 } 973 974 // NewERC20BurnableTransactor creates a new write-only instance of ERC20Burnable, bound to a specific deployed contract. 975 func NewERC20BurnableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20BurnableTransactor, error) { 976 contract, err := bindERC20Burnable(address, nil, transactor, nil) 977 if err != nil { 978 return nil, err 979 } 980 return &ERC20BurnableTransactor{contract: contract}, nil 981 } 982 983 // NewERC20BurnableFilterer creates a new log filterer instance of ERC20Burnable, bound to a specific deployed contract. 984 func NewERC20BurnableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20BurnableFilterer, error) { 985 contract, err := bindERC20Burnable(address, nil, nil, filterer) 986 if err != nil { 987 return nil, err 988 } 989 return &ERC20BurnableFilterer{contract: contract}, nil 990 } 991 992 // bindERC20Burnable binds a generic wrapper to an already deployed contract. 993 func bindERC20Burnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 994 parsed, err := abi.JSON(strings.NewReader(ERC20BurnableABI)) 995 if err != nil { 996 return nil, err 997 } 998 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 999 } 1000 1001 // Call invokes the (constant) contract method with params as input values and 1002 // sets the output to result. The result type might be a single field for simple 1003 // returns, a slice of interfaces for anonymous returns and a struct for named 1004 // returns. 1005 func (_ERC20Burnable *ERC20BurnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 1006 return _ERC20Burnable.Contract.ERC20BurnableCaller.contract.Call(opts, result, method, params...) 1007 } 1008 1009 // Transfer initiates a plain transaction to move funds to the contract, calling 1010 // its default method if one is available. 1011 func (_ERC20Burnable *ERC20BurnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 1012 return _ERC20Burnable.Contract.ERC20BurnableTransactor.contract.Transfer(opts) 1013 } 1014 1015 // Transact invokes the (paid) contract method with params as input values. 1016 func (_ERC20Burnable *ERC20BurnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 1017 return _ERC20Burnable.Contract.ERC20BurnableTransactor.contract.Transact(opts, method, params...) 1018 } 1019 1020 // Call invokes the (constant) contract method with params as input values and 1021 // sets the output to result. The result type might be a single field for simple 1022 // returns, a slice of interfaces for anonymous returns and a struct for named 1023 // returns. 1024 func (_ERC20Burnable *ERC20BurnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 1025 return _ERC20Burnable.Contract.contract.Call(opts, result, method, params...) 1026 } 1027 1028 // Transfer initiates a plain transaction to move funds to the contract, calling 1029 // its default method if one is available. 1030 func (_ERC20Burnable *ERC20BurnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 1031 return _ERC20Burnable.Contract.contract.Transfer(opts) 1032 } 1033 1034 // Transact invokes the (paid) contract method with params as input values. 1035 func (_ERC20Burnable *ERC20BurnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 1036 return _ERC20Burnable.Contract.contract.Transact(opts, method, params...) 1037 } 1038 1039 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1040 // 1041 // Solidity: function allowance(address owner, address spender) view returns(uint256) 1042 func (_ERC20Burnable *ERC20BurnableCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 1043 var ( 1044 ret0 = new(*big.Int) 1045 ) 1046 out := ret0 1047 err := _ERC20Burnable.contract.Call(opts, out, "allowance", owner, spender) 1048 return *ret0, err 1049 } 1050 1051 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1052 // 1053 // Solidity: function allowance(address owner, address spender) view returns(uint256) 1054 func (_ERC20Burnable *ERC20BurnableSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 1055 return _ERC20Burnable.Contract.Allowance(&_ERC20Burnable.CallOpts, owner, spender) 1056 } 1057 1058 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1059 // 1060 // Solidity: function allowance(address owner, address spender) view returns(uint256) 1061 func (_ERC20Burnable *ERC20BurnableCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 1062 return _ERC20Burnable.Contract.Allowance(&_ERC20Burnable.CallOpts, owner, spender) 1063 } 1064 1065 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1066 // 1067 // Solidity: function balanceOf(address account) view returns(uint256) 1068 func (_ERC20Burnable *ERC20BurnableCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 1069 var ( 1070 ret0 = new(*big.Int) 1071 ) 1072 out := ret0 1073 err := _ERC20Burnable.contract.Call(opts, out, "balanceOf", account) 1074 return *ret0, err 1075 } 1076 1077 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1078 // 1079 // Solidity: function balanceOf(address account) view returns(uint256) 1080 func (_ERC20Burnable *ERC20BurnableSession) BalanceOf(account common.Address) (*big.Int, error) { 1081 return _ERC20Burnable.Contract.BalanceOf(&_ERC20Burnable.CallOpts, account) 1082 } 1083 1084 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1085 // 1086 // Solidity: function balanceOf(address account) view returns(uint256) 1087 func (_ERC20Burnable *ERC20BurnableCallerSession) BalanceOf(account common.Address) (*big.Int, error) { 1088 return _ERC20Burnable.Contract.BalanceOf(&_ERC20Burnable.CallOpts, account) 1089 } 1090 1091 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1092 // 1093 // Solidity: function totalSupply() view returns(uint256) 1094 func (_ERC20Burnable *ERC20BurnableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 1095 var ( 1096 ret0 = new(*big.Int) 1097 ) 1098 out := ret0 1099 err := _ERC20Burnable.contract.Call(opts, out, "totalSupply") 1100 return *ret0, err 1101 } 1102 1103 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1104 // 1105 // Solidity: function totalSupply() view returns(uint256) 1106 func (_ERC20Burnable *ERC20BurnableSession) TotalSupply() (*big.Int, error) { 1107 return _ERC20Burnable.Contract.TotalSupply(&_ERC20Burnable.CallOpts) 1108 } 1109 1110 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1111 // 1112 // Solidity: function totalSupply() view returns(uint256) 1113 func (_ERC20Burnable *ERC20BurnableCallerSession) TotalSupply() (*big.Int, error) { 1114 return _ERC20Burnable.Contract.TotalSupply(&_ERC20Burnable.CallOpts) 1115 } 1116 1117 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1118 // 1119 // Solidity: function approve(address spender, uint256 value) returns(bool) 1120 func (_ERC20Burnable *ERC20BurnableTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { 1121 return _ERC20Burnable.contract.Transact(opts, "approve", spender, value) 1122 } 1123 1124 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1125 // 1126 // Solidity: function approve(address spender, uint256 value) returns(bool) 1127 func (_ERC20Burnable *ERC20BurnableSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 1128 return _ERC20Burnable.Contract.Approve(&_ERC20Burnable.TransactOpts, spender, value) 1129 } 1130 1131 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1132 // 1133 // Solidity: function approve(address spender, uint256 value) returns(bool) 1134 func (_ERC20Burnable *ERC20BurnableTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 1135 return _ERC20Burnable.Contract.Approve(&_ERC20Burnable.TransactOpts, spender, value) 1136 } 1137 1138 // Burn is a paid mutator transaction binding the contract method 0x42966c68. 1139 // 1140 // Solidity: function burn(uint256 amount) returns() 1141 func (_ERC20Burnable *ERC20BurnableTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { 1142 return _ERC20Burnable.contract.Transact(opts, "burn", amount) 1143 } 1144 1145 // Burn is a paid mutator transaction binding the contract method 0x42966c68. 1146 // 1147 // Solidity: function burn(uint256 amount) returns() 1148 func (_ERC20Burnable *ERC20BurnableSession) Burn(amount *big.Int) (*types.Transaction, error) { 1149 return _ERC20Burnable.Contract.Burn(&_ERC20Burnable.TransactOpts, amount) 1150 } 1151 1152 // Burn is a paid mutator transaction binding the contract method 0x42966c68. 1153 // 1154 // Solidity: function burn(uint256 amount) returns() 1155 func (_ERC20Burnable *ERC20BurnableTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { 1156 return _ERC20Burnable.Contract.Burn(&_ERC20Burnable.TransactOpts, amount) 1157 } 1158 1159 // BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. 1160 // 1161 // Solidity: function burnFrom(address account, uint256 amount) returns() 1162 func (_ERC20Burnable *ERC20BurnableTransactor) BurnFrom(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { 1163 return _ERC20Burnable.contract.Transact(opts, "burnFrom", account, amount) 1164 } 1165 1166 // BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. 1167 // 1168 // Solidity: function burnFrom(address account, uint256 amount) returns() 1169 func (_ERC20Burnable *ERC20BurnableSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { 1170 return _ERC20Burnable.Contract.BurnFrom(&_ERC20Burnable.TransactOpts, account, amount) 1171 } 1172 1173 // BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. 1174 // 1175 // Solidity: function burnFrom(address account, uint256 amount) returns() 1176 func (_ERC20Burnable *ERC20BurnableTransactorSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { 1177 return _ERC20Burnable.Contract.BurnFrom(&_ERC20Burnable.TransactOpts, account, amount) 1178 } 1179 1180 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1181 // 1182 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1183 func (_ERC20Burnable *ERC20BurnableTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1184 return _ERC20Burnable.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 1185 } 1186 1187 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1188 // 1189 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1190 func (_ERC20Burnable *ERC20BurnableSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1191 return _ERC20Burnable.Contract.DecreaseAllowance(&_ERC20Burnable.TransactOpts, spender, subtractedValue) 1192 } 1193 1194 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1195 // 1196 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1197 func (_ERC20Burnable *ERC20BurnableTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1198 return _ERC20Burnable.Contract.DecreaseAllowance(&_ERC20Burnable.TransactOpts, spender, subtractedValue) 1199 } 1200 1201 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1202 // 1203 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1204 func (_ERC20Burnable *ERC20BurnableTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1205 return _ERC20Burnable.contract.Transact(opts, "increaseAllowance", spender, addedValue) 1206 } 1207 1208 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1209 // 1210 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1211 func (_ERC20Burnable *ERC20BurnableSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1212 return _ERC20Burnable.Contract.IncreaseAllowance(&_ERC20Burnable.TransactOpts, spender, addedValue) 1213 } 1214 1215 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1216 // 1217 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1218 func (_ERC20Burnable *ERC20BurnableTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1219 return _ERC20Burnable.Contract.IncreaseAllowance(&_ERC20Burnable.TransactOpts, spender, addedValue) 1220 } 1221 1222 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1223 // 1224 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1225 func (_ERC20Burnable *ERC20BurnableTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1226 return _ERC20Burnable.contract.Transact(opts, "transfer", recipient, amount) 1227 } 1228 1229 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1230 // 1231 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1232 func (_ERC20Burnable *ERC20BurnableSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1233 return _ERC20Burnable.Contract.Transfer(&_ERC20Burnable.TransactOpts, recipient, amount) 1234 } 1235 1236 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1237 // 1238 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1239 func (_ERC20Burnable *ERC20BurnableTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1240 return _ERC20Burnable.Contract.Transfer(&_ERC20Burnable.TransactOpts, recipient, amount) 1241 } 1242 1243 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 1244 // 1245 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 1246 func (_ERC20Burnable *ERC20BurnableTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1247 return _ERC20Burnable.contract.Transact(opts, "transferFrom", sender, recipient, amount) 1248 } 1249 1250 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 1251 // 1252 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 1253 func (_ERC20Burnable *ERC20BurnableSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1254 return _ERC20Burnable.Contract.TransferFrom(&_ERC20Burnable.TransactOpts, sender, recipient, amount) 1255 } 1256 1257 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 1258 // 1259 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 1260 func (_ERC20Burnable *ERC20BurnableTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1261 return _ERC20Burnable.Contract.TransferFrom(&_ERC20Burnable.TransactOpts, sender, recipient, amount) 1262 } 1263 1264 // ERC20BurnableApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20Burnable contract. 1265 type ERC20BurnableApprovalIterator struct { 1266 Event *ERC20BurnableApproval // Event containing the contract specifics and raw log 1267 1268 contract *bind.BoundContract // Generic contract to use for unpacking event data 1269 event string // Event name to use for unpacking event data 1270 1271 logs chan types.Log // Log channel receiving the found contract events 1272 sub klaytn.Subscription // Subscription for errors, completion and termination 1273 done bool // Whether the subscription completed delivering logs 1274 fail error // Occurred error to stop iteration 1275 } 1276 1277 // Next advances the iterator to the subsequent event, returning whether there 1278 // are any more events found. In case of a retrieval or parsing error, false is 1279 // returned and Error() can be queried for the exact failure. 1280 func (it *ERC20BurnableApprovalIterator) Next() bool { 1281 // If the iterator failed, stop iterating 1282 if it.fail != nil { 1283 return false 1284 } 1285 // If the iterator completed, deliver directly whatever's available 1286 if it.done { 1287 select { 1288 case log := <-it.logs: 1289 it.Event = new(ERC20BurnableApproval) 1290 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1291 it.fail = err 1292 return false 1293 } 1294 it.Event.Raw = log 1295 return true 1296 1297 default: 1298 return false 1299 } 1300 } 1301 // Iterator still in progress, wait for either a data or an error event 1302 select { 1303 case log := <-it.logs: 1304 it.Event = new(ERC20BurnableApproval) 1305 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1306 it.fail = err 1307 return false 1308 } 1309 it.Event.Raw = log 1310 return true 1311 1312 case err := <-it.sub.Err(): 1313 it.done = true 1314 it.fail = err 1315 return it.Next() 1316 } 1317 } 1318 1319 // Error returns any retrieval or parsing error occurred during filtering. 1320 func (it *ERC20BurnableApprovalIterator) Error() error { 1321 return it.fail 1322 } 1323 1324 // Close terminates the iteration process, releasing any pending underlying 1325 // resources. 1326 func (it *ERC20BurnableApprovalIterator) Close() error { 1327 it.sub.Unsubscribe() 1328 return nil 1329 } 1330 1331 // ERC20BurnableApproval represents a Approval event raised by the ERC20Burnable contract. 1332 type ERC20BurnableApproval struct { 1333 Owner common.Address 1334 Spender common.Address 1335 Value *big.Int 1336 Raw types.Log // Blockchain specific contextual infos 1337 } 1338 1339 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 1340 // 1341 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 1342 func (_ERC20Burnable *ERC20BurnableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20BurnableApprovalIterator, error) { 1343 1344 var ownerRule []interface{} 1345 for _, ownerItem := range owner { 1346 ownerRule = append(ownerRule, ownerItem) 1347 } 1348 var spenderRule []interface{} 1349 for _, spenderItem := range spender { 1350 spenderRule = append(spenderRule, spenderItem) 1351 } 1352 1353 logs, sub, err := _ERC20Burnable.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 1354 if err != nil { 1355 return nil, err 1356 } 1357 return &ERC20BurnableApprovalIterator{contract: _ERC20Burnable.contract, event: "Approval", logs: logs, sub: sub}, nil 1358 } 1359 1360 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 1361 // 1362 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 1363 func (_ERC20Burnable *ERC20BurnableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20BurnableApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 1364 1365 var ownerRule []interface{} 1366 for _, ownerItem := range owner { 1367 ownerRule = append(ownerRule, ownerItem) 1368 } 1369 var spenderRule []interface{} 1370 for _, spenderItem := range spender { 1371 spenderRule = append(spenderRule, spenderItem) 1372 } 1373 1374 logs, sub, err := _ERC20Burnable.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 1375 if err != nil { 1376 return nil, err 1377 } 1378 return event.NewSubscription(func(quit <-chan struct{}) error { 1379 defer sub.Unsubscribe() 1380 for { 1381 select { 1382 case log := <-logs: 1383 // New log arrived, parse the event and forward to the user 1384 event := new(ERC20BurnableApproval) 1385 if err := _ERC20Burnable.contract.UnpackLog(event, "Approval", log); err != nil { 1386 return err 1387 } 1388 event.Raw = log 1389 1390 select { 1391 case sink <- event: 1392 case err := <-sub.Err(): 1393 return err 1394 case <-quit: 1395 return nil 1396 } 1397 case err := <-sub.Err(): 1398 return err 1399 case <-quit: 1400 return nil 1401 } 1402 } 1403 }), nil 1404 } 1405 1406 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 1407 // 1408 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 1409 func (_ERC20Burnable *ERC20BurnableFilterer) ParseApproval(log types.Log) (*ERC20BurnableApproval, error) { 1410 event := new(ERC20BurnableApproval) 1411 if err := _ERC20Burnable.contract.UnpackLog(event, "Approval", log); err != nil { 1412 return nil, err 1413 } 1414 return event, nil 1415 } 1416 1417 // ERC20BurnableTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20Burnable contract. 1418 type ERC20BurnableTransferIterator struct { 1419 Event *ERC20BurnableTransfer // Event containing the contract specifics and raw log 1420 1421 contract *bind.BoundContract // Generic contract to use for unpacking event data 1422 event string // Event name to use for unpacking event data 1423 1424 logs chan types.Log // Log channel receiving the found contract events 1425 sub klaytn.Subscription // Subscription for errors, completion and termination 1426 done bool // Whether the subscription completed delivering logs 1427 fail error // Occurred error to stop iteration 1428 } 1429 1430 // Next advances the iterator to the subsequent event, returning whether there 1431 // are any more events found. In case of a retrieval or parsing error, false is 1432 // returned and Error() can be queried for the exact failure. 1433 func (it *ERC20BurnableTransferIterator) Next() bool { 1434 // If the iterator failed, stop iterating 1435 if it.fail != nil { 1436 return false 1437 } 1438 // If the iterator completed, deliver directly whatever's available 1439 if it.done { 1440 select { 1441 case log := <-it.logs: 1442 it.Event = new(ERC20BurnableTransfer) 1443 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1444 it.fail = err 1445 return false 1446 } 1447 it.Event.Raw = log 1448 return true 1449 1450 default: 1451 return false 1452 } 1453 } 1454 // Iterator still in progress, wait for either a data or an error event 1455 select { 1456 case log := <-it.logs: 1457 it.Event = new(ERC20BurnableTransfer) 1458 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1459 it.fail = err 1460 return false 1461 } 1462 it.Event.Raw = log 1463 return true 1464 1465 case err := <-it.sub.Err(): 1466 it.done = true 1467 it.fail = err 1468 return it.Next() 1469 } 1470 } 1471 1472 // Error returns any retrieval or parsing error occurred during filtering. 1473 func (it *ERC20BurnableTransferIterator) Error() error { 1474 return it.fail 1475 } 1476 1477 // Close terminates the iteration process, releasing any pending underlying 1478 // resources. 1479 func (it *ERC20BurnableTransferIterator) Close() error { 1480 it.sub.Unsubscribe() 1481 return nil 1482 } 1483 1484 // ERC20BurnableTransfer represents a Transfer event raised by the ERC20Burnable contract. 1485 type ERC20BurnableTransfer struct { 1486 From common.Address 1487 To common.Address 1488 Value *big.Int 1489 Raw types.Log // Blockchain specific contextual infos 1490 } 1491 1492 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1493 // 1494 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1495 func (_ERC20Burnable *ERC20BurnableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20BurnableTransferIterator, error) { 1496 1497 var fromRule []interface{} 1498 for _, fromItem := range from { 1499 fromRule = append(fromRule, fromItem) 1500 } 1501 var toRule []interface{} 1502 for _, toItem := range to { 1503 toRule = append(toRule, toItem) 1504 } 1505 1506 logs, sub, err := _ERC20Burnable.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 1507 if err != nil { 1508 return nil, err 1509 } 1510 return &ERC20BurnableTransferIterator{contract: _ERC20Burnable.contract, event: "Transfer", logs: logs, sub: sub}, nil 1511 } 1512 1513 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1514 // 1515 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1516 func (_ERC20Burnable *ERC20BurnableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20BurnableTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 1517 1518 var fromRule []interface{} 1519 for _, fromItem := range from { 1520 fromRule = append(fromRule, fromItem) 1521 } 1522 var toRule []interface{} 1523 for _, toItem := range to { 1524 toRule = append(toRule, toItem) 1525 } 1526 1527 logs, sub, err := _ERC20Burnable.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 1528 if err != nil { 1529 return nil, err 1530 } 1531 return event.NewSubscription(func(quit <-chan struct{}) error { 1532 defer sub.Unsubscribe() 1533 for { 1534 select { 1535 case log := <-logs: 1536 // New log arrived, parse the event and forward to the user 1537 event := new(ERC20BurnableTransfer) 1538 if err := _ERC20Burnable.contract.UnpackLog(event, "Transfer", log); err != nil { 1539 return err 1540 } 1541 event.Raw = log 1542 1543 select { 1544 case sink <- event: 1545 case err := <-sub.Err(): 1546 return err 1547 case <-quit: 1548 return nil 1549 } 1550 case err := <-sub.Err(): 1551 return err 1552 case <-quit: 1553 return nil 1554 } 1555 } 1556 }), nil 1557 } 1558 1559 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 1560 // 1561 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 1562 func (_ERC20Burnable *ERC20BurnableFilterer) ParseTransfer(log types.Log) (*ERC20BurnableTransfer, error) { 1563 event := new(ERC20BurnableTransfer) 1564 if err := _ERC20Burnable.contract.UnpackLog(event, "Transfer", log); err != nil { 1565 return nil, err 1566 } 1567 return event, nil 1568 } 1569 1570 // ERC20MintableABI is the input ABI used to generate the binding from. 1571 const ERC20MintableABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" 1572 1573 // ERC20MintableBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 1574 const ERC20MintableBinRuntime = `608060405234801561001057600080fd5b50600436106100b45760003560e01c8063983b2d5611610071578063983b2d56146101c757806398650275146101ef578063a457c2d7146101f7578063a9059cbb14610223578063aa271e1a1461024f578063dd62ed3e14610275576100b4565b8063095ea7b3146100b957806318160ddd146100f957806323b872dd14610113578063395093511461014957806340c10f191461017557806370a08231146101a1575b600080fd5b6100e5600480360360408110156100cf57600080fd5b506001600160a01b0381351690602001356102a3565b604080519115158252519081900360200190f35b6101016102b9565b60408051918252519081900360200190f35b6100e56004803603606081101561012957600080fd5b506001600160a01b038135811691602081013590911690604001356102bf565b6100e56004803603604081101561015f57600080fd5b506001600160a01b038135169060200135610316565b6100e56004803603604081101561018b57600080fd5b506001600160a01b038135169060200135610352565b610101600480360360208110156101b757600080fd5b50356001600160a01b03166103a5565b6101ed600480360360208110156101dd57600080fd5b50356001600160a01b03166103c0565b005b6101ed610413565b6100e56004803603604081101561020d57600080fd5b506001600160a01b03813516906020013561041e565b6100e56004803603604081101561023957600080fd5b506001600160a01b03813516906020013561045a565b6100e56004803603602081101561026557600080fd5b50356001600160a01b0316610467565b6101016004803603604081101561028b57600080fd5b506001600160a01b0381358116916020013516610480565b60006102b03384846104ab565b50600192915050565b60025490565b60006102cc84848461059d565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461030c918691610307908663ffffffff6106e516565b6104ab565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102b0918590610307908663ffffffff61074516565b600061035d33610467565b61039b57604051600160e51b62461bcd028152600401808060200182810382526030815260200180610aca6030913960400191505060405180910390fd5b6102b083836107a9565b6001600160a01b031660009081526020819052604090205490565b6103c933610467565b61040757604051600160e51b62461bcd028152600401808060200182810382526030815260200180610aca6030913960400191505060405180910390fd5b6104108161089c565b50565b61041c336108e4565b565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102b0918590610307908663ffffffff6106e516565b60006102b033848461059d565b600061047a60038363ffffffff61092c16565b92915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166104f357604051600160e51b62461bcd028152600401808060200182810382526024815260200180610b626024913960400191505060405180910390fd5b6001600160a01b03821661053b57604051600160e51b62461bcd028152600401808060200182810382526022815260200180610aa86022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166105e557604051600160e51b62461bcd028152600401808060200182810382526025815260200180610b3d6025913960400191505060405180910390fd5b6001600160a01b03821661062d57604051600160e51b62461bcd028152600401808060200182810382526023815260200180610a856023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610656908263ffffffff6106e516565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461068b908263ffffffff61074516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282111561073f5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156107a25760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166108075760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b60025461081a908263ffffffff61074516565b6002556001600160a01b038216600090815260208190526040902054610846908263ffffffff61074516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6108ad60038263ffffffff61099616565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6108f560038263ffffffff610a1a16565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b03821661097657604051600160e51b62461bcd028152600401808060200182810382526022815260200180610b1b6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b6109a0828261092c565b156109f55760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610a24828261092c565b610a6257604051600160e51b62461bcd028152600401808060200182810382526021815260200180610afa6021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a723058208533d6897cadaf6784525a9d32e613a3c81da44cfdedf624f1bdb497f8b68f4a0029` 1575 1576 // ERC20MintableFuncSigs maps the 4-byte function signature to its string representation. 1577 var ERC20MintableFuncSigs = map[string]string{ 1578 "983b2d56": "addMinter(address)", 1579 "dd62ed3e": "allowance(address,address)", 1580 "095ea7b3": "approve(address,uint256)", 1581 "70a08231": "balanceOf(address)", 1582 "a457c2d7": "decreaseAllowance(address,uint256)", 1583 "39509351": "increaseAllowance(address,uint256)", 1584 "aa271e1a": "isMinter(address)", 1585 "40c10f19": "mint(address,uint256)", 1586 "98650275": "renounceMinter()", 1587 "18160ddd": "totalSupply()", 1588 "a9059cbb": "transfer(address,uint256)", 1589 "23b872dd": "transferFrom(address,address,uint256)", 1590 } 1591 1592 // ERC20MintableBin is the compiled bytecode used for deploying new contracts. 1593 var ERC20MintableBin = "0x60806040526100133361001860201b60201c565b610189565b61003081600361006760201b6109961790919060201c565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b610077828261010860201b60201c565b156100e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b038216610169576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610d496022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b610bb1806101986000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063983b2d5611610071578063983b2d56146101c757806398650275146101ef578063a457c2d7146101f7578063a9059cbb14610223578063aa271e1a1461024f578063dd62ed3e14610275576100b4565b8063095ea7b3146100b957806318160ddd146100f957806323b872dd14610113578063395093511461014957806340c10f191461017557806370a08231146101a1575b600080fd5b6100e5600480360360408110156100cf57600080fd5b506001600160a01b0381351690602001356102a3565b604080519115158252519081900360200190f35b6101016102b9565b60408051918252519081900360200190f35b6100e56004803603606081101561012957600080fd5b506001600160a01b038135811691602081013590911690604001356102bf565b6100e56004803603604081101561015f57600080fd5b506001600160a01b038135169060200135610316565b6100e56004803603604081101561018b57600080fd5b506001600160a01b038135169060200135610352565b610101600480360360208110156101b757600080fd5b50356001600160a01b03166103a5565b6101ed600480360360208110156101dd57600080fd5b50356001600160a01b03166103c0565b005b6101ed610413565b6100e56004803603604081101561020d57600080fd5b506001600160a01b03813516906020013561041e565b6100e56004803603604081101561023957600080fd5b506001600160a01b03813516906020013561045a565b6100e56004803603602081101561026557600080fd5b50356001600160a01b0316610467565b6101016004803603604081101561028b57600080fd5b506001600160a01b0381358116916020013516610480565b60006102b03384846104ab565b50600192915050565b60025490565b60006102cc84848461059d565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461030c918691610307908663ffffffff6106e516565b6104ab565b5060019392505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102b0918590610307908663ffffffff61074516565b600061035d33610467565b61039b57604051600160e51b62461bcd028152600401808060200182810382526030815260200180610aca6030913960400191505060405180910390fd5b6102b083836107a9565b6001600160a01b031660009081526020819052604090205490565b6103c933610467565b61040757604051600160e51b62461bcd028152600401808060200182810382526030815260200180610aca6030913960400191505060405180910390fd5b6104108161089c565b50565b61041c336108e4565b565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916102b0918590610307908663ffffffff6106e516565b60006102b033848461059d565b600061047a60038363ffffffff61092c16565b92915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166104f357604051600160e51b62461bcd028152600401808060200182810382526024815260200180610b626024913960400191505060405180910390fd5b6001600160a01b03821661053b57604051600160e51b62461bcd028152600401808060200182810382526022815260200180610aa86022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166105e557604051600160e51b62461bcd028152600401808060200182810382526025815260200180610b3d6025913960400191505060405180910390fd5b6001600160a01b03821661062d57604051600160e51b62461bcd028152600401808060200182810382526023815260200180610a856023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610656908263ffffffff6106e516565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461068b908263ffffffff61074516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282111561073f5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156107a25760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166108075760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b60025461081a908263ffffffff61074516565b6002556001600160a01b038216600090815260208190526040902054610846908263ffffffff61074516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6108ad60038263ffffffff61099616565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6108f560038263ffffffff610a1a16565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b03821661097657604051600160e51b62461bcd028152600401808060200182810382526022815260200180610b1b6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b6109a0828261092c565b156109f55760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610a24828261092c565b610a6257604051600160e51b62461bcd028152600401808060200182810382526021815260200180610afa6021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a723058208533d6897cadaf6784525a9d32e613a3c81da44cfdedf624f1bdb497f8b68f4a0029526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373" 1594 1595 // DeployERC20Mintable deploys a new Klaytn contract, binding an instance of ERC20Mintable to it. 1596 func DeployERC20Mintable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ERC20Mintable, error) { 1597 parsed, err := abi.JSON(strings.NewReader(ERC20MintableABI)) 1598 if err != nil { 1599 return common.Address{}, nil, nil, err 1600 } 1601 1602 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20MintableBin), backend) 1603 if err != nil { 1604 return common.Address{}, nil, nil, err 1605 } 1606 return address, tx, &ERC20Mintable{ERC20MintableCaller: ERC20MintableCaller{contract: contract}, ERC20MintableTransactor: ERC20MintableTransactor{contract: contract}, ERC20MintableFilterer: ERC20MintableFilterer{contract: contract}}, nil 1607 } 1608 1609 // ERC20Mintable is an auto generated Go binding around a Klaytn contract. 1610 type ERC20Mintable struct { 1611 ERC20MintableCaller // Read-only binding to the contract 1612 ERC20MintableTransactor // Write-only binding to the contract 1613 ERC20MintableFilterer // Log filterer for contract events 1614 } 1615 1616 // ERC20MintableCaller is an auto generated read-only Go binding around a Klaytn contract. 1617 type ERC20MintableCaller struct { 1618 contract *bind.BoundContract // Generic contract wrapper for the low level calls 1619 } 1620 1621 // ERC20MintableTransactor is an auto generated write-only Go binding around a Klaytn contract. 1622 type ERC20MintableTransactor struct { 1623 contract *bind.BoundContract // Generic contract wrapper for the low level calls 1624 } 1625 1626 // ERC20MintableFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 1627 type ERC20MintableFilterer struct { 1628 contract *bind.BoundContract // Generic contract wrapper for the low level calls 1629 } 1630 1631 // ERC20MintableSession is an auto generated Go binding around a Klaytn contract, 1632 // with pre-set call and transact options. 1633 type ERC20MintableSession struct { 1634 Contract *ERC20Mintable // Generic contract binding to set the session for 1635 CallOpts bind.CallOpts // Call options to use throughout this session 1636 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 1637 } 1638 1639 // ERC20MintableCallerSession is an auto generated read-only Go binding around a Klaytn contract, 1640 // with pre-set call options. 1641 type ERC20MintableCallerSession struct { 1642 Contract *ERC20MintableCaller // Generic contract caller binding to set the session for 1643 CallOpts bind.CallOpts // Call options to use throughout this session 1644 } 1645 1646 // ERC20MintableTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 1647 // with pre-set transact options. 1648 type ERC20MintableTransactorSession struct { 1649 Contract *ERC20MintableTransactor // Generic contract transactor binding to set the session for 1650 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 1651 } 1652 1653 // ERC20MintableRaw is an auto generated low-level Go binding around a Klaytn contract. 1654 type ERC20MintableRaw struct { 1655 Contract *ERC20Mintable // Generic contract binding to access the raw methods on 1656 } 1657 1658 // ERC20MintableCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 1659 type ERC20MintableCallerRaw struct { 1660 Contract *ERC20MintableCaller // Generic read-only contract binding to access the raw methods on 1661 } 1662 1663 // ERC20MintableTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 1664 type ERC20MintableTransactorRaw struct { 1665 Contract *ERC20MintableTransactor // Generic write-only contract binding to access the raw methods on 1666 } 1667 1668 // NewERC20Mintable creates a new instance of ERC20Mintable, bound to a specific deployed contract. 1669 func NewERC20Mintable(address common.Address, backend bind.ContractBackend) (*ERC20Mintable, error) { 1670 contract, err := bindERC20Mintable(address, backend, backend, backend) 1671 if err != nil { 1672 return nil, err 1673 } 1674 return &ERC20Mintable{ERC20MintableCaller: ERC20MintableCaller{contract: contract}, ERC20MintableTransactor: ERC20MintableTransactor{contract: contract}, ERC20MintableFilterer: ERC20MintableFilterer{contract: contract}}, nil 1675 } 1676 1677 // NewERC20MintableCaller creates a new read-only instance of ERC20Mintable, bound to a specific deployed contract. 1678 func NewERC20MintableCaller(address common.Address, caller bind.ContractCaller) (*ERC20MintableCaller, error) { 1679 contract, err := bindERC20Mintable(address, caller, nil, nil) 1680 if err != nil { 1681 return nil, err 1682 } 1683 return &ERC20MintableCaller{contract: contract}, nil 1684 } 1685 1686 // NewERC20MintableTransactor creates a new write-only instance of ERC20Mintable, bound to a specific deployed contract. 1687 func NewERC20MintableTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20MintableTransactor, error) { 1688 contract, err := bindERC20Mintable(address, nil, transactor, nil) 1689 if err != nil { 1690 return nil, err 1691 } 1692 return &ERC20MintableTransactor{contract: contract}, nil 1693 } 1694 1695 // NewERC20MintableFilterer creates a new log filterer instance of ERC20Mintable, bound to a specific deployed contract. 1696 func NewERC20MintableFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20MintableFilterer, error) { 1697 contract, err := bindERC20Mintable(address, nil, nil, filterer) 1698 if err != nil { 1699 return nil, err 1700 } 1701 return &ERC20MintableFilterer{contract: contract}, nil 1702 } 1703 1704 // bindERC20Mintable binds a generic wrapper to an already deployed contract. 1705 func bindERC20Mintable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 1706 parsed, err := abi.JSON(strings.NewReader(ERC20MintableABI)) 1707 if err != nil { 1708 return nil, err 1709 } 1710 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 1711 } 1712 1713 // Call invokes the (constant) contract method with params as input values and 1714 // sets the output to result. The result type might be a single field for simple 1715 // returns, a slice of interfaces for anonymous returns and a struct for named 1716 // returns. 1717 func (_ERC20Mintable *ERC20MintableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 1718 return _ERC20Mintable.Contract.ERC20MintableCaller.contract.Call(opts, result, method, params...) 1719 } 1720 1721 // Transfer initiates a plain transaction to move funds to the contract, calling 1722 // its default method if one is available. 1723 func (_ERC20Mintable *ERC20MintableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 1724 return _ERC20Mintable.Contract.ERC20MintableTransactor.contract.Transfer(opts) 1725 } 1726 1727 // Transact invokes the (paid) contract method with params as input values. 1728 func (_ERC20Mintable *ERC20MintableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 1729 return _ERC20Mintable.Contract.ERC20MintableTransactor.contract.Transact(opts, method, params...) 1730 } 1731 1732 // Call invokes the (constant) contract method with params as input values and 1733 // sets the output to result. The result type might be a single field for simple 1734 // returns, a slice of interfaces for anonymous returns and a struct for named 1735 // returns. 1736 func (_ERC20Mintable *ERC20MintableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 1737 return _ERC20Mintable.Contract.contract.Call(opts, result, method, params...) 1738 } 1739 1740 // Transfer initiates a plain transaction to move funds to the contract, calling 1741 // its default method if one is available. 1742 func (_ERC20Mintable *ERC20MintableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 1743 return _ERC20Mintable.Contract.contract.Transfer(opts) 1744 } 1745 1746 // Transact invokes the (paid) contract method with params as input values. 1747 func (_ERC20Mintable *ERC20MintableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 1748 return _ERC20Mintable.Contract.contract.Transact(opts, method, params...) 1749 } 1750 1751 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1752 // 1753 // Solidity: function allowance(address owner, address spender) view returns(uint256) 1754 func (_ERC20Mintable *ERC20MintableCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 1755 var ( 1756 ret0 = new(*big.Int) 1757 ) 1758 out := ret0 1759 err := _ERC20Mintable.contract.Call(opts, out, "allowance", owner, spender) 1760 return *ret0, err 1761 } 1762 1763 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1764 // 1765 // Solidity: function allowance(address owner, address spender) view returns(uint256) 1766 func (_ERC20Mintable *ERC20MintableSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 1767 return _ERC20Mintable.Contract.Allowance(&_ERC20Mintable.CallOpts, owner, spender) 1768 } 1769 1770 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 1771 // 1772 // Solidity: function allowance(address owner, address spender) view returns(uint256) 1773 func (_ERC20Mintable *ERC20MintableCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 1774 return _ERC20Mintable.Contract.Allowance(&_ERC20Mintable.CallOpts, owner, spender) 1775 } 1776 1777 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1778 // 1779 // Solidity: function balanceOf(address account) view returns(uint256) 1780 func (_ERC20Mintable *ERC20MintableCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 1781 var ( 1782 ret0 = new(*big.Int) 1783 ) 1784 out := ret0 1785 err := _ERC20Mintable.contract.Call(opts, out, "balanceOf", account) 1786 return *ret0, err 1787 } 1788 1789 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1790 // 1791 // Solidity: function balanceOf(address account) view returns(uint256) 1792 func (_ERC20Mintable *ERC20MintableSession) BalanceOf(account common.Address) (*big.Int, error) { 1793 return _ERC20Mintable.Contract.BalanceOf(&_ERC20Mintable.CallOpts, account) 1794 } 1795 1796 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 1797 // 1798 // Solidity: function balanceOf(address account) view returns(uint256) 1799 func (_ERC20Mintable *ERC20MintableCallerSession) BalanceOf(account common.Address) (*big.Int, error) { 1800 return _ERC20Mintable.Contract.BalanceOf(&_ERC20Mintable.CallOpts, account) 1801 } 1802 1803 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 1804 // 1805 // Solidity: function isMinter(address account) view returns(bool) 1806 func (_ERC20Mintable *ERC20MintableCaller) IsMinter(opts *bind.CallOpts, account common.Address) (bool, error) { 1807 var ( 1808 ret0 = new(bool) 1809 ) 1810 out := ret0 1811 err := _ERC20Mintable.contract.Call(opts, out, "isMinter", account) 1812 return *ret0, err 1813 } 1814 1815 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 1816 // 1817 // Solidity: function isMinter(address account) view returns(bool) 1818 func (_ERC20Mintable *ERC20MintableSession) IsMinter(account common.Address) (bool, error) { 1819 return _ERC20Mintable.Contract.IsMinter(&_ERC20Mintable.CallOpts, account) 1820 } 1821 1822 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 1823 // 1824 // Solidity: function isMinter(address account) view returns(bool) 1825 func (_ERC20Mintable *ERC20MintableCallerSession) IsMinter(account common.Address) (bool, error) { 1826 return _ERC20Mintable.Contract.IsMinter(&_ERC20Mintable.CallOpts, account) 1827 } 1828 1829 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1830 // 1831 // Solidity: function totalSupply() view returns(uint256) 1832 func (_ERC20Mintable *ERC20MintableCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 1833 var ( 1834 ret0 = new(*big.Int) 1835 ) 1836 out := ret0 1837 err := _ERC20Mintable.contract.Call(opts, out, "totalSupply") 1838 return *ret0, err 1839 } 1840 1841 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1842 // 1843 // Solidity: function totalSupply() view returns(uint256) 1844 func (_ERC20Mintable *ERC20MintableSession) TotalSupply() (*big.Int, error) { 1845 return _ERC20Mintable.Contract.TotalSupply(&_ERC20Mintable.CallOpts) 1846 } 1847 1848 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 1849 // 1850 // Solidity: function totalSupply() view returns(uint256) 1851 func (_ERC20Mintable *ERC20MintableCallerSession) TotalSupply() (*big.Int, error) { 1852 return _ERC20Mintable.Contract.TotalSupply(&_ERC20Mintable.CallOpts) 1853 } 1854 1855 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 1856 // 1857 // Solidity: function addMinter(address account) returns() 1858 func (_ERC20Mintable *ERC20MintableTransactor) AddMinter(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { 1859 return _ERC20Mintable.contract.Transact(opts, "addMinter", account) 1860 } 1861 1862 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 1863 // 1864 // Solidity: function addMinter(address account) returns() 1865 func (_ERC20Mintable *ERC20MintableSession) AddMinter(account common.Address) (*types.Transaction, error) { 1866 return _ERC20Mintable.Contract.AddMinter(&_ERC20Mintable.TransactOpts, account) 1867 } 1868 1869 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 1870 // 1871 // Solidity: function addMinter(address account) returns() 1872 func (_ERC20Mintable *ERC20MintableTransactorSession) AddMinter(account common.Address) (*types.Transaction, error) { 1873 return _ERC20Mintable.Contract.AddMinter(&_ERC20Mintable.TransactOpts, account) 1874 } 1875 1876 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1877 // 1878 // Solidity: function approve(address spender, uint256 value) returns(bool) 1879 func (_ERC20Mintable *ERC20MintableTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { 1880 return _ERC20Mintable.contract.Transact(opts, "approve", spender, value) 1881 } 1882 1883 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1884 // 1885 // Solidity: function approve(address spender, uint256 value) returns(bool) 1886 func (_ERC20Mintable *ERC20MintableSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 1887 return _ERC20Mintable.Contract.Approve(&_ERC20Mintable.TransactOpts, spender, value) 1888 } 1889 1890 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 1891 // 1892 // Solidity: function approve(address spender, uint256 value) returns(bool) 1893 func (_ERC20Mintable *ERC20MintableTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 1894 return _ERC20Mintable.Contract.Approve(&_ERC20Mintable.TransactOpts, spender, value) 1895 } 1896 1897 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1898 // 1899 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1900 func (_ERC20Mintable *ERC20MintableTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1901 return _ERC20Mintable.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 1902 } 1903 1904 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1905 // 1906 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1907 func (_ERC20Mintable *ERC20MintableSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1908 return _ERC20Mintable.Contract.DecreaseAllowance(&_ERC20Mintable.TransactOpts, spender, subtractedValue) 1909 } 1910 1911 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 1912 // 1913 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 1914 func (_ERC20Mintable *ERC20MintableTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 1915 return _ERC20Mintable.Contract.DecreaseAllowance(&_ERC20Mintable.TransactOpts, spender, subtractedValue) 1916 } 1917 1918 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1919 // 1920 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1921 func (_ERC20Mintable *ERC20MintableTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1922 return _ERC20Mintable.contract.Transact(opts, "increaseAllowance", spender, addedValue) 1923 } 1924 1925 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1926 // 1927 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1928 func (_ERC20Mintable *ERC20MintableSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1929 return _ERC20Mintable.Contract.IncreaseAllowance(&_ERC20Mintable.TransactOpts, spender, addedValue) 1930 } 1931 1932 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 1933 // 1934 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 1935 func (_ERC20Mintable *ERC20MintableTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 1936 return _ERC20Mintable.Contract.IncreaseAllowance(&_ERC20Mintable.TransactOpts, spender, addedValue) 1937 } 1938 1939 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 1940 // 1941 // Solidity: function mint(address account, uint256 amount) returns(bool) 1942 func (_ERC20Mintable *ERC20MintableTransactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { 1943 return _ERC20Mintable.contract.Transact(opts, "mint", account, amount) 1944 } 1945 1946 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 1947 // 1948 // Solidity: function mint(address account, uint256 amount) returns(bool) 1949 func (_ERC20Mintable *ERC20MintableSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { 1950 return _ERC20Mintable.Contract.Mint(&_ERC20Mintable.TransactOpts, account, amount) 1951 } 1952 1953 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 1954 // 1955 // Solidity: function mint(address account, uint256 amount) returns(bool) 1956 func (_ERC20Mintable *ERC20MintableTransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { 1957 return _ERC20Mintable.Contract.Mint(&_ERC20Mintable.TransactOpts, account, amount) 1958 } 1959 1960 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 1961 // 1962 // Solidity: function renounceMinter() returns() 1963 func (_ERC20Mintable *ERC20MintableTransactor) RenounceMinter(opts *bind.TransactOpts) (*types.Transaction, error) { 1964 return _ERC20Mintable.contract.Transact(opts, "renounceMinter") 1965 } 1966 1967 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 1968 // 1969 // Solidity: function renounceMinter() returns() 1970 func (_ERC20Mintable *ERC20MintableSession) RenounceMinter() (*types.Transaction, error) { 1971 return _ERC20Mintable.Contract.RenounceMinter(&_ERC20Mintable.TransactOpts) 1972 } 1973 1974 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 1975 // 1976 // Solidity: function renounceMinter() returns() 1977 func (_ERC20Mintable *ERC20MintableTransactorSession) RenounceMinter() (*types.Transaction, error) { 1978 return _ERC20Mintable.Contract.RenounceMinter(&_ERC20Mintable.TransactOpts) 1979 } 1980 1981 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1982 // 1983 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1984 func (_ERC20Mintable *ERC20MintableTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1985 return _ERC20Mintable.contract.Transact(opts, "transfer", recipient, amount) 1986 } 1987 1988 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1989 // 1990 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1991 func (_ERC20Mintable *ERC20MintableSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1992 return _ERC20Mintable.Contract.Transfer(&_ERC20Mintable.TransactOpts, recipient, amount) 1993 } 1994 1995 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 1996 // 1997 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 1998 func (_ERC20Mintable *ERC20MintableTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 1999 return _ERC20Mintable.Contract.Transfer(&_ERC20Mintable.TransactOpts, recipient, amount) 2000 } 2001 2002 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 2003 // 2004 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 2005 func (_ERC20Mintable *ERC20MintableTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2006 return _ERC20Mintable.contract.Transact(opts, "transferFrom", sender, recipient, amount) 2007 } 2008 2009 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 2010 // 2011 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 2012 func (_ERC20Mintable *ERC20MintableSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2013 return _ERC20Mintable.Contract.TransferFrom(&_ERC20Mintable.TransactOpts, sender, recipient, amount) 2014 } 2015 2016 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 2017 // 2018 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 2019 func (_ERC20Mintable *ERC20MintableTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 2020 return _ERC20Mintable.Contract.TransferFrom(&_ERC20Mintable.TransactOpts, sender, recipient, amount) 2021 } 2022 2023 // 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. 2024 type ERC20MintableApprovalIterator struct { 2025 Event *ERC20MintableApproval // Event containing the contract specifics and raw log 2026 2027 contract *bind.BoundContract // Generic contract to use for unpacking event data 2028 event string // Event name to use for unpacking event data 2029 2030 logs chan types.Log // Log channel receiving the found contract events 2031 sub klaytn.Subscription // Subscription for errors, completion and termination 2032 done bool // Whether the subscription completed delivering logs 2033 fail error // Occurred error to stop iteration 2034 } 2035 2036 // Next advances the iterator to the subsequent event, returning whether there 2037 // are any more events found. In case of a retrieval or parsing error, false is 2038 // returned and Error() can be queried for the exact failure. 2039 func (it *ERC20MintableApprovalIterator) Next() bool { 2040 // If the iterator failed, stop iterating 2041 if it.fail != nil { 2042 return false 2043 } 2044 // If the iterator completed, deliver directly whatever's available 2045 if it.done { 2046 select { 2047 case log := <-it.logs: 2048 it.Event = new(ERC20MintableApproval) 2049 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2050 it.fail = err 2051 return false 2052 } 2053 it.Event.Raw = log 2054 return true 2055 2056 default: 2057 return false 2058 } 2059 } 2060 // Iterator still in progress, wait for either a data or an error event 2061 select { 2062 case log := <-it.logs: 2063 it.Event = new(ERC20MintableApproval) 2064 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2065 it.fail = err 2066 return false 2067 } 2068 it.Event.Raw = log 2069 return true 2070 2071 case err := <-it.sub.Err(): 2072 it.done = true 2073 it.fail = err 2074 return it.Next() 2075 } 2076 } 2077 2078 // Error returns any retrieval or parsing error occurred during filtering. 2079 func (it *ERC20MintableApprovalIterator) Error() error { 2080 return it.fail 2081 } 2082 2083 // Close terminates the iteration process, releasing any pending underlying 2084 // resources. 2085 func (it *ERC20MintableApprovalIterator) Close() error { 2086 it.sub.Unsubscribe() 2087 return nil 2088 } 2089 2090 // ERC20MintableApproval represents a Approval event raised by the ERC20Mintable contract. 2091 type ERC20MintableApproval struct { 2092 Owner common.Address 2093 Spender common.Address 2094 Value *big.Int 2095 Raw types.Log // Blockchain specific contextual infos 2096 } 2097 2098 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 2099 // 2100 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 2101 func (_ERC20Mintable *ERC20MintableFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20MintableApprovalIterator, error) { 2102 2103 var ownerRule []interface{} 2104 for _, ownerItem := range owner { 2105 ownerRule = append(ownerRule, ownerItem) 2106 } 2107 var spenderRule []interface{} 2108 for _, spenderItem := range spender { 2109 spenderRule = append(spenderRule, spenderItem) 2110 } 2111 2112 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 2113 if err != nil { 2114 return nil, err 2115 } 2116 return &ERC20MintableApprovalIterator{contract: _ERC20Mintable.contract, event: "Approval", logs: logs, sub: sub}, nil 2117 } 2118 2119 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 2120 // 2121 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 2122 func (_ERC20Mintable *ERC20MintableFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20MintableApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 2123 2124 var ownerRule []interface{} 2125 for _, ownerItem := range owner { 2126 ownerRule = append(ownerRule, ownerItem) 2127 } 2128 var spenderRule []interface{} 2129 for _, spenderItem := range spender { 2130 spenderRule = append(spenderRule, spenderItem) 2131 } 2132 2133 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 2134 if err != nil { 2135 return nil, err 2136 } 2137 return event.NewSubscription(func(quit <-chan struct{}) error { 2138 defer sub.Unsubscribe() 2139 for { 2140 select { 2141 case log := <-logs: 2142 // New log arrived, parse the event and forward to the user 2143 event := new(ERC20MintableApproval) 2144 if err := _ERC20Mintable.contract.UnpackLog(event, "Approval", log); err != nil { 2145 return err 2146 } 2147 event.Raw = log 2148 2149 select { 2150 case sink <- event: 2151 case err := <-sub.Err(): 2152 return err 2153 case <-quit: 2154 return nil 2155 } 2156 case err := <-sub.Err(): 2157 return err 2158 case <-quit: 2159 return nil 2160 } 2161 } 2162 }), nil 2163 } 2164 2165 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 2166 // 2167 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 2168 func (_ERC20Mintable *ERC20MintableFilterer) ParseApproval(log types.Log) (*ERC20MintableApproval, error) { 2169 event := new(ERC20MintableApproval) 2170 if err := _ERC20Mintable.contract.UnpackLog(event, "Approval", log); err != nil { 2171 return nil, err 2172 } 2173 return event, nil 2174 } 2175 2176 // 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. 2177 type ERC20MintableMinterAddedIterator struct { 2178 Event *ERC20MintableMinterAdded // 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 klaytn.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 *ERC20MintableMinterAddedIterator) 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(ERC20MintableMinterAdded) 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(ERC20MintableMinterAdded) 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 *ERC20MintableMinterAddedIterator) Error() error { 2233 return it.fail 2234 } 2235 2236 // Close terminates the iteration process, releasing any pending underlying 2237 // resources. 2238 func (it *ERC20MintableMinterAddedIterator) Close() error { 2239 it.sub.Unsubscribe() 2240 return nil 2241 } 2242 2243 // ERC20MintableMinterAdded represents a MinterAdded event raised by the ERC20Mintable contract. 2244 type ERC20MintableMinterAdded struct { 2245 Account common.Address 2246 Raw types.Log // Blockchain specific contextual infos 2247 } 2248 2249 // FilterMinterAdded is a free log retrieval operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 2250 // 2251 // Solidity: event MinterAdded(address indexed account) 2252 func (_ERC20Mintable *ERC20MintableFilterer) FilterMinterAdded(opts *bind.FilterOpts, account []common.Address) (*ERC20MintableMinterAddedIterator, error) { 2253 2254 var accountRule []interface{} 2255 for _, accountItem := range account { 2256 accountRule = append(accountRule, accountItem) 2257 } 2258 2259 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "MinterAdded", accountRule) 2260 if err != nil { 2261 return nil, err 2262 } 2263 return &ERC20MintableMinterAddedIterator{contract: _ERC20Mintable.contract, event: "MinterAdded", logs: logs, sub: sub}, nil 2264 } 2265 2266 // WatchMinterAdded is a free log subscription operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 2267 // 2268 // Solidity: event MinterAdded(address indexed account) 2269 func (_ERC20Mintable *ERC20MintableFilterer) WatchMinterAdded(opts *bind.WatchOpts, sink chan<- *ERC20MintableMinterAdded, account []common.Address) (event.Subscription, error) { 2270 2271 var accountRule []interface{} 2272 for _, accountItem := range account { 2273 accountRule = append(accountRule, accountItem) 2274 } 2275 2276 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "MinterAdded", accountRule) 2277 if err != nil { 2278 return nil, err 2279 } 2280 return event.NewSubscription(func(quit <-chan struct{}) error { 2281 defer sub.Unsubscribe() 2282 for { 2283 select { 2284 case log := <-logs: 2285 // New log arrived, parse the event and forward to the user 2286 event := new(ERC20MintableMinterAdded) 2287 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterAdded", log); err != nil { 2288 return err 2289 } 2290 event.Raw = log 2291 2292 select { 2293 case sink <- event: 2294 case err := <-sub.Err(): 2295 return err 2296 case <-quit: 2297 return nil 2298 } 2299 case err := <-sub.Err(): 2300 return err 2301 case <-quit: 2302 return nil 2303 } 2304 } 2305 }), nil 2306 } 2307 2308 // ParseMinterAdded is a log parse operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 2309 // 2310 // Solidity: event MinterAdded(address indexed account) 2311 func (_ERC20Mintable *ERC20MintableFilterer) ParseMinterAdded(log types.Log) (*ERC20MintableMinterAdded, error) { 2312 event := new(ERC20MintableMinterAdded) 2313 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterAdded", log); err != nil { 2314 return nil, err 2315 } 2316 return event, nil 2317 } 2318 2319 // 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. 2320 type ERC20MintableMinterRemovedIterator struct { 2321 Event *ERC20MintableMinterRemoved // Event containing the contract specifics and raw log 2322 2323 contract *bind.BoundContract // Generic contract to use for unpacking event data 2324 event string // Event name to use for unpacking event data 2325 2326 logs chan types.Log // Log channel receiving the found contract events 2327 sub klaytn.Subscription // Subscription for errors, completion and termination 2328 done bool // Whether the subscription completed delivering logs 2329 fail error // Occurred error to stop iteration 2330 } 2331 2332 // Next advances the iterator to the subsequent event, returning whether there 2333 // are any more events found. In case of a retrieval or parsing error, false is 2334 // returned and Error() can be queried for the exact failure. 2335 func (it *ERC20MintableMinterRemovedIterator) Next() bool { 2336 // If the iterator failed, stop iterating 2337 if it.fail != nil { 2338 return false 2339 } 2340 // If the iterator completed, deliver directly whatever's available 2341 if it.done { 2342 select { 2343 case log := <-it.logs: 2344 it.Event = new(ERC20MintableMinterRemoved) 2345 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2346 it.fail = err 2347 return false 2348 } 2349 it.Event.Raw = log 2350 return true 2351 2352 default: 2353 return false 2354 } 2355 } 2356 // Iterator still in progress, wait for either a data or an error event 2357 select { 2358 case log := <-it.logs: 2359 it.Event = new(ERC20MintableMinterRemoved) 2360 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2361 it.fail = err 2362 return false 2363 } 2364 it.Event.Raw = log 2365 return true 2366 2367 case err := <-it.sub.Err(): 2368 it.done = true 2369 it.fail = err 2370 return it.Next() 2371 } 2372 } 2373 2374 // Error returns any retrieval or parsing error occurred during filtering. 2375 func (it *ERC20MintableMinterRemovedIterator) Error() error { 2376 return it.fail 2377 } 2378 2379 // Close terminates the iteration process, releasing any pending underlying 2380 // resources. 2381 func (it *ERC20MintableMinterRemovedIterator) Close() error { 2382 it.sub.Unsubscribe() 2383 return nil 2384 } 2385 2386 // ERC20MintableMinterRemoved represents a MinterRemoved event raised by the ERC20Mintable contract. 2387 type ERC20MintableMinterRemoved struct { 2388 Account common.Address 2389 Raw types.Log // Blockchain specific contextual infos 2390 } 2391 2392 // FilterMinterRemoved is a free log retrieval operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 2393 // 2394 // Solidity: event MinterRemoved(address indexed account) 2395 func (_ERC20Mintable *ERC20MintableFilterer) FilterMinterRemoved(opts *bind.FilterOpts, account []common.Address) (*ERC20MintableMinterRemovedIterator, error) { 2396 2397 var accountRule []interface{} 2398 for _, accountItem := range account { 2399 accountRule = append(accountRule, accountItem) 2400 } 2401 2402 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "MinterRemoved", accountRule) 2403 if err != nil { 2404 return nil, err 2405 } 2406 return &ERC20MintableMinterRemovedIterator{contract: _ERC20Mintable.contract, event: "MinterRemoved", logs: logs, sub: sub}, nil 2407 } 2408 2409 // WatchMinterRemoved is a free log subscription operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 2410 // 2411 // Solidity: event MinterRemoved(address indexed account) 2412 func (_ERC20Mintable *ERC20MintableFilterer) WatchMinterRemoved(opts *bind.WatchOpts, sink chan<- *ERC20MintableMinterRemoved, account []common.Address) (event.Subscription, error) { 2413 2414 var accountRule []interface{} 2415 for _, accountItem := range account { 2416 accountRule = append(accountRule, accountItem) 2417 } 2418 2419 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "MinterRemoved", accountRule) 2420 if err != nil { 2421 return nil, err 2422 } 2423 return event.NewSubscription(func(quit <-chan struct{}) error { 2424 defer sub.Unsubscribe() 2425 for { 2426 select { 2427 case log := <-logs: 2428 // New log arrived, parse the event and forward to the user 2429 event := new(ERC20MintableMinterRemoved) 2430 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 2431 return err 2432 } 2433 event.Raw = log 2434 2435 select { 2436 case sink <- event: 2437 case err := <-sub.Err(): 2438 return err 2439 case <-quit: 2440 return nil 2441 } 2442 case err := <-sub.Err(): 2443 return err 2444 case <-quit: 2445 return nil 2446 } 2447 } 2448 }), nil 2449 } 2450 2451 // ParseMinterRemoved is a log parse operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 2452 // 2453 // Solidity: event MinterRemoved(address indexed account) 2454 func (_ERC20Mintable *ERC20MintableFilterer) ParseMinterRemoved(log types.Log) (*ERC20MintableMinterRemoved, error) { 2455 event := new(ERC20MintableMinterRemoved) 2456 if err := _ERC20Mintable.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 2457 return nil, err 2458 } 2459 return event, nil 2460 } 2461 2462 // 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. 2463 type ERC20MintableTransferIterator struct { 2464 Event *ERC20MintableTransfer // Event containing the contract specifics and raw log 2465 2466 contract *bind.BoundContract // Generic contract to use for unpacking event data 2467 event string // Event name to use for unpacking event data 2468 2469 logs chan types.Log // Log channel receiving the found contract events 2470 sub klaytn.Subscription // Subscription for errors, completion and termination 2471 done bool // Whether the subscription completed delivering logs 2472 fail error // Occurred error to stop iteration 2473 } 2474 2475 // Next advances the iterator to the subsequent event, returning whether there 2476 // are any more events found. In case of a retrieval or parsing error, false is 2477 // returned and Error() can be queried for the exact failure. 2478 func (it *ERC20MintableTransferIterator) Next() bool { 2479 // If the iterator failed, stop iterating 2480 if it.fail != nil { 2481 return false 2482 } 2483 // If the iterator completed, deliver directly whatever's available 2484 if it.done { 2485 select { 2486 case log := <-it.logs: 2487 it.Event = new(ERC20MintableTransfer) 2488 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2489 it.fail = err 2490 return false 2491 } 2492 it.Event.Raw = log 2493 return true 2494 2495 default: 2496 return false 2497 } 2498 } 2499 // Iterator still in progress, wait for either a data or an error event 2500 select { 2501 case log := <-it.logs: 2502 it.Event = new(ERC20MintableTransfer) 2503 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2504 it.fail = err 2505 return false 2506 } 2507 it.Event.Raw = log 2508 return true 2509 2510 case err := <-it.sub.Err(): 2511 it.done = true 2512 it.fail = err 2513 return it.Next() 2514 } 2515 } 2516 2517 // Error returns any retrieval or parsing error occurred during filtering. 2518 func (it *ERC20MintableTransferIterator) Error() error { 2519 return it.fail 2520 } 2521 2522 // Close terminates the iteration process, releasing any pending underlying 2523 // resources. 2524 func (it *ERC20MintableTransferIterator) Close() error { 2525 it.sub.Unsubscribe() 2526 return nil 2527 } 2528 2529 // ERC20MintableTransfer represents a Transfer event raised by the ERC20Mintable contract. 2530 type ERC20MintableTransfer struct { 2531 From common.Address 2532 To common.Address 2533 Value *big.Int 2534 Raw types.Log // Blockchain specific contextual infos 2535 } 2536 2537 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 2538 // 2539 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 2540 func (_ERC20Mintable *ERC20MintableFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20MintableTransferIterator, error) { 2541 2542 var fromRule []interface{} 2543 for _, fromItem := range from { 2544 fromRule = append(fromRule, fromItem) 2545 } 2546 var toRule []interface{} 2547 for _, toItem := range to { 2548 toRule = append(toRule, toItem) 2549 } 2550 2551 logs, sub, err := _ERC20Mintable.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 2552 if err != nil { 2553 return nil, err 2554 } 2555 return &ERC20MintableTransferIterator{contract: _ERC20Mintable.contract, event: "Transfer", logs: logs, sub: sub}, nil 2556 } 2557 2558 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 2559 // 2560 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 2561 func (_ERC20Mintable *ERC20MintableFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20MintableTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 2562 2563 var fromRule []interface{} 2564 for _, fromItem := range from { 2565 fromRule = append(fromRule, fromItem) 2566 } 2567 var toRule []interface{} 2568 for _, toItem := range to { 2569 toRule = append(toRule, toItem) 2570 } 2571 2572 logs, sub, err := _ERC20Mintable.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 2573 if err != nil { 2574 return nil, err 2575 } 2576 return event.NewSubscription(func(quit <-chan struct{}) error { 2577 defer sub.Unsubscribe() 2578 for { 2579 select { 2580 case log := <-logs: 2581 // New log arrived, parse the event and forward to the user 2582 event := new(ERC20MintableTransfer) 2583 if err := _ERC20Mintable.contract.UnpackLog(event, "Transfer", log); err != nil { 2584 return err 2585 } 2586 event.Raw = log 2587 2588 select { 2589 case sink <- event: 2590 case err := <-sub.Err(): 2591 return err 2592 case <-quit: 2593 return nil 2594 } 2595 case err := <-sub.Err(): 2596 return err 2597 case <-quit: 2598 return nil 2599 } 2600 } 2601 }), nil 2602 } 2603 2604 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 2605 // 2606 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 2607 func (_ERC20Mintable *ERC20MintableFilterer) ParseTransfer(log types.Log) (*ERC20MintableTransfer, error) { 2608 event := new(ERC20MintableTransfer) 2609 if err := _ERC20Mintable.contract.UnpackLog(event, "Transfer", log); err != nil { 2610 return nil, err 2611 } 2612 return event, nil 2613 } 2614 2615 // ERC20ServiceChainABI is the input ABI used to generate the binding from. 2616 const ERC20ServiceChainABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_feeLimit\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"requestValueTransfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_bridge\",\"type\":\"address\"}],\"name\":\"setBridge\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_bridge\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" 2617 2618 // ERC20ServiceChainBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 2619 const ERC20ServiceChainBinRuntime = `` 2620 2621 // ERC20ServiceChainFuncSigs maps the 4-byte function signature to its string representation. 2622 var ERC20ServiceChainFuncSigs = map[string]string{ 2623 "dd62ed3e": "allowance(address,address)", 2624 "095ea7b3": "approve(address,uint256)", 2625 "70a08231": "balanceOf(address)", 2626 "e78cea92": "bridge()", 2627 "a457c2d7": "decreaseAllowance(address,uint256)", 2628 "39509351": "increaseAllowance(address,uint256)", 2629 "8f32d59b": "isOwner()", 2630 "8da5cb5b": "owner()", 2631 "715018a6": "renounceOwnership()", 2632 "3dc3c9e1": "requestValueTransfer(uint256,address,uint256,bytes)", 2633 "8dd14802": "setBridge(address)", 2634 "18160ddd": "totalSupply()", 2635 "a9059cbb": "transfer(address,uint256)", 2636 "23b872dd": "transferFrom(address,address,uint256)", 2637 "f2fde38b": "transferOwnership(address)", 2638 } 2639 2640 // ERC20ServiceChain is an auto generated Go binding around a Klaytn contract. 2641 type ERC20ServiceChain struct { 2642 ERC20ServiceChainCaller // Read-only binding to the contract 2643 ERC20ServiceChainTransactor // Write-only binding to the contract 2644 ERC20ServiceChainFilterer // Log filterer for contract events 2645 } 2646 2647 // ERC20ServiceChainCaller is an auto generated read-only Go binding around a Klaytn contract. 2648 type ERC20ServiceChainCaller struct { 2649 contract *bind.BoundContract // Generic contract wrapper for the low level calls 2650 } 2651 2652 // ERC20ServiceChainTransactor is an auto generated write-only Go binding around a Klaytn contract. 2653 type ERC20ServiceChainTransactor struct { 2654 contract *bind.BoundContract // Generic contract wrapper for the low level calls 2655 } 2656 2657 // ERC20ServiceChainFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 2658 type ERC20ServiceChainFilterer struct { 2659 contract *bind.BoundContract // Generic contract wrapper for the low level calls 2660 } 2661 2662 // ERC20ServiceChainSession is an auto generated Go binding around a Klaytn contract, 2663 // with pre-set call and transact options. 2664 type ERC20ServiceChainSession struct { 2665 Contract *ERC20ServiceChain // Generic contract binding to set the session for 2666 CallOpts bind.CallOpts // Call options to use throughout this session 2667 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 2668 } 2669 2670 // ERC20ServiceChainCallerSession is an auto generated read-only Go binding around a Klaytn contract, 2671 // with pre-set call options. 2672 type ERC20ServiceChainCallerSession struct { 2673 Contract *ERC20ServiceChainCaller // Generic contract caller binding to set the session for 2674 CallOpts bind.CallOpts // Call options to use throughout this session 2675 } 2676 2677 // ERC20ServiceChainTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 2678 // with pre-set transact options. 2679 type ERC20ServiceChainTransactorSession struct { 2680 Contract *ERC20ServiceChainTransactor // Generic contract transactor binding to set the session for 2681 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 2682 } 2683 2684 // ERC20ServiceChainRaw is an auto generated low-level Go binding around a Klaytn contract. 2685 type ERC20ServiceChainRaw struct { 2686 Contract *ERC20ServiceChain // Generic contract binding to access the raw methods on 2687 } 2688 2689 // ERC20ServiceChainCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 2690 type ERC20ServiceChainCallerRaw struct { 2691 Contract *ERC20ServiceChainCaller // Generic read-only contract binding to access the raw methods on 2692 } 2693 2694 // ERC20ServiceChainTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 2695 type ERC20ServiceChainTransactorRaw struct { 2696 Contract *ERC20ServiceChainTransactor // Generic write-only contract binding to access the raw methods on 2697 } 2698 2699 // NewERC20ServiceChain creates a new instance of ERC20ServiceChain, bound to a specific deployed contract. 2700 func NewERC20ServiceChain(address common.Address, backend bind.ContractBackend) (*ERC20ServiceChain, error) { 2701 contract, err := bindERC20ServiceChain(address, backend, backend, backend) 2702 if err != nil { 2703 return nil, err 2704 } 2705 return &ERC20ServiceChain{ERC20ServiceChainCaller: ERC20ServiceChainCaller{contract: contract}, ERC20ServiceChainTransactor: ERC20ServiceChainTransactor{contract: contract}, ERC20ServiceChainFilterer: ERC20ServiceChainFilterer{contract: contract}}, nil 2706 } 2707 2708 // NewERC20ServiceChainCaller creates a new read-only instance of ERC20ServiceChain, bound to a specific deployed contract. 2709 func NewERC20ServiceChainCaller(address common.Address, caller bind.ContractCaller) (*ERC20ServiceChainCaller, error) { 2710 contract, err := bindERC20ServiceChain(address, caller, nil, nil) 2711 if err != nil { 2712 return nil, err 2713 } 2714 return &ERC20ServiceChainCaller{contract: contract}, nil 2715 } 2716 2717 // NewERC20ServiceChainTransactor creates a new write-only instance of ERC20ServiceChain, bound to a specific deployed contract. 2718 func NewERC20ServiceChainTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20ServiceChainTransactor, error) { 2719 contract, err := bindERC20ServiceChain(address, nil, transactor, nil) 2720 if err != nil { 2721 return nil, err 2722 } 2723 return &ERC20ServiceChainTransactor{contract: contract}, nil 2724 } 2725 2726 // NewERC20ServiceChainFilterer creates a new log filterer instance of ERC20ServiceChain, bound to a specific deployed contract. 2727 func NewERC20ServiceChainFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20ServiceChainFilterer, error) { 2728 contract, err := bindERC20ServiceChain(address, nil, nil, filterer) 2729 if err != nil { 2730 return nil, err 2731 } 2732 return &ERC20ServiceChainFilterer{contract: contract}, nil 2733 } 2734 2735 // bindERC20ServiceChain binds a generic wrapper to an already deployed contract. 2736 func bindERC20ServiceChain(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 2737 parsed, err := abi.JSON(strings.NewReader(ERC20ServiceChainABI)) 2738 if err != nil { 2739 return nil, err 2740 } 2741 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 2742 } 2743 2744 // Call invokes the (constant) contract method with params as input values and 2745 // sets the output to result. The result type might be a single field for simple 2746 // returns, a slice of interfaces for anonymous returns and a struct for named 2747 // returns. 2748 func (_ERC20ServiceChain *ERC20ServiceChainRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 2749 return _ERC20ServiceChain.Contract.ERC20ServiceChainCaller.contract.Call(opts, result, method, params...) 2750 } 2751 2752 // Transfer initiates a plain transaction to move funds to the contract, calling 2753 // its default method if one is available. 2754 func (_ERC20ServiceChain *ERC20ServiceChainRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 2755 return _ERC20ServiceChain.Contract.ERC20ServiceChainTransactor.contract.Transfer(opts) 2756 } 2757 2758 // Transact invokes the (paid) contract method with params as input values. 2759 func (_ERC20ServiceChain *ERC20ServiceChainRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 2760 return _ERC20ServiceChain.Contract.ERC20ServiceChainTransactor.contract.Transact(opts, method, params...) 2761 } 2762 2763 // Call invokes the (constant) contract method with params as input values and 2764 // sets the output to result. The result type might be a single field for simple 2765 // returns, a slice of interfaces for anonymous returns and a struct for named 2766 // returns. 2767 func (_ERC20ServiceChain *ERC20ServiceChainCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 2768 return _ERC20ServiceChain.Contract.contract.Call(opts, result, method, params...) 2769 } 2770 2771 // Transfer initiates a plain transaction to move funds to the contract, calling 2772 // its default method if one is available. 2773 func (_ERC20ServiceChain *ERC20ServiceChainTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 2774 return _ERC20ServiceChain.Contract.contract.Transfer(opts) 2775 } 2776 2777 // Transact invokes the (paid) contract method with params as input values. 2778 func (_ERC20ServiceChain *ERC20ServiceChainTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 2779 return _ERC20ServiceChain.Contract.contract.Transact(opts, method, params...) 2780 } 2781 2782 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 2783 // 2784 // Solidity: function allowance(address owner, address spender) view returns(uint256) 2785 func (_ERC20ServiceChain *ERC20ServiceChainCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 2786 var ( 2787 ret0 = new(*big.Int) 2788 ) 2789 out := ret0 2790 err := _ERC20ServiceChain.contract.Call(opts, out, "allowance", owner, spender) 2791 return *ret0, err 2792 } 2793 2794 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 2795 // 2796 // Solidity: function allowance(address owner, address spender) view returns(uint256) 2797 func (_ERC20ServiceChain *ERC20ServiceChainSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 2798 return _ERC20ServiceChain.Contract.Allowance(&_ERC20ServiceChain.CallOpts, owner, spender) 2799 } 2800 2801 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 2802 // 2803 // Solidity: function allowance(address owner, address spender) view returns(uint256) 2804 func (_ERC20ServiceChain *ERC20ServiceChainCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 2805 return _ERC20ServiceChain.Contract.Allowance(&_ERC20ServiceChain.CallOpts, owner, spender) 2806 } 2807 2808 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 2809 // 2810 // Solidity: function balanceOf(address account) view returns(uint256) 2811 func (_ERC20ServiceChain *ERC20ServiceChainCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 2812 var ( 2813 ret0 = new(*big.Int) 2814 ) 2815 out := ret0 2816 err := _ERC20ServiceChain.contract.Call(opts, out, "balanceOf", account) 2817 return *ret0, err 2818 } 2819 2820 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 2821 // 2822 // Solidity: function balanceOf(address account) view returns(uint256) 2823 func (_ERC20ServiceChain *ERC20ServiceChainSession) BalanceOf(account common.Address) (*big.Int, error) { 2824 return _ERC20ServiceChain.Contract.BalanceOf(&_ERC20ServiceChain.CallOpts, account) 2825 } 2826 2827 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 2828 // 2829 // Solidity: function balanceOf(address account) view returns(uint256) 2830 func (_ERC20ServiceChain *ERC20ServiceChainCallerSession) BalanceOf(account common.Address) (*big.Int, error) { 2831 return _ERC20ServiceChain.Contract.BalanceOf(&_ERC20ServiceChain.CallOpts, account) 2832 } 2833 2834 // Bridge is a free data retrieval call binding the contract method 0xe78cea92. 2835 // 2836 // Solidity: function bridge() view returns(address) 2837 func (_ERC20ServiceChain *ERC20ServiceChainCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { 2838 var ( 2839 ret0 = new(common.Address) 2840 ) 2841 out := ret0 2842 err := _ERC20ServiceChain.contract.Call(opts, out, "bridge") 2843 return *ret0, err 2844 } 2845 2846 // Bridge is a free data retrieval call binding the contract method 0xe78cea92. 2847 // 2848 // Solidity: function bridge() view returns(address) 2849 func (_ERC20ServiceChain *ERC20ServiceChainSession) Bridge() (common.Address, error) { 2850 return _ERC20ServiceChain.Contract.Bridge(&_ERC20ServiceChain.CallOpts) 2851 } 2852 2853 // Bridge is a free data retrieval call binding the contract method 0xe78cea92. 2854 // 2855 // Solidity: function bridge() view returns(address) 2856 func (_ERC20ServiceChain *ERC20ServiceChainCallerSession) Bridge() (common.Address, error) { 2857 return _ERC20ServiceChain.Contract.Bridge(&_ERC20ServiceChain.CallOpts) 2858 } 2859 2860 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 2861 // 2862 // Solidity: function isOwner() view returns(bool) 2863 func (_ERC20ServiceChain *ERC20ServiceChainCaller) IsOwner(opts *bind.CallOpts) (bool, error) { 2864 var ( 2865 ret0 = new(bool) 2866 ) 2867 out := ret0 2868 err := _ERC20ServiceChain.contract.Call(opts, out, "isOwner") 2869 return *ret0, err 2870 } 2871 2872 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 2873 // 2874 // Solidity: function isOwner() view returns(bool) 2875 func (_ERC20ServiceChain *ERC20ServiceChainSession) IsOwner() (bool, error) { 2876 return _ERC20ServiceChain.Contract.IsOwner(&_ERC20ServiceChain.CallOpts) 2877 } 2878 2879 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 2880 // 2881 // Solidity: function isOwner() view returns(bool) 2882 func (_ERC20ServiceChain *ERC20ServiceChainCallerSession) IsOwner() (bool, error) { 2883 return _ERC20ServiceChain.Contract.IsOwner(&_ERC20ServiceChain.CallOpts) 2884 } 2885 2886 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 2887 // 2888 // Solidity: function owner() view returns(address) 2889 func (_ERC20ServiceChain *ERC20ServiceChainCaller) Owner(opts *bind.CallOpts) (common.Address, error) { 2890 var ( 2891 ret0 = new(common.Address) 2892 ) 2893 out := ret0 2894 err := _ERC20ServiceChain.contract.Call(opts, out, "owner") 2895 return *ret0, err 2896 } 2897 2898 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 2899 // 2900 // Solidity: function owner() view returns(address) 2901 func (_ERC20ServiceChain *ERC20ServiceChainSession) Owner() (common.Address, error) { 2902 return _ERC20ServiceChain.Contract.Owner(&_ERC20ServiceChain.CallOpts) 2903 } 2904 2905 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 2906 // 2907 // Solidity: function owner() view returns(address) 2908 func (_ERC20ServiceChain *ERC20ServiceChainCallerSession) Owner() (common.Address, error) { 2909 return _ERC20ServiceChain.Contract.Owner(&_ERC20ServiceChain.CallOpts) 2910 } 2911 2912 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 2913 // 2914 // Solidity: function totalSupply() view returns(uint256) 2915 func (_ERC20ServiceChain *ERC20ServiceChainCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 2916 var ( 2917 ret0 = new(*big.Int) 2918 ) 2919 out := ret0 2920 err := _ERC20ServiceChain.contract.Call(opts, out, "totalSupply") 2921 return *ret0, err 2922 } 2923 2924 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 2925 // 2926 // Solidity: function totalSupply() view returns(uint256) 2927 func (_ERC20ServiceChain *ERC20ServiceChainSession) TotalSupply() (*big.Int, error) { 2928 return _ERC20ServiceChain.Contract.TotalSupply(&_ERC20ServiceChain.CallOpts) 2929 } 2930 2931 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 2932 // 2933 // Solidity: function totalSupply() view returns(uint256) 2934 func (_ERC20ServiceChain *ERC20ServiceChainCallerSession) TotalSupply() (*big.Int, error) { 2935 return _ERC20ServiceChain.Contract.TotalSupply(&_ERC20ServiceChain.CallOpts) 2936 } 2937 2938 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 2939 // 2940 // Solidity: function approve(address spender, uint256 value) returns(bool) 2941 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { 2942 return _ERC20ServiceChain.contract.Transact(opts, "approve", spender, value) 2943 } 2944 2945 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 2946 // 2947 // Solidity: function approve(address spender, uint256 value) returns(bool) 2948 func (_ERC20ServiceChain *ERC20ServiceChainSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 2949 return _ERC20ServiceChain.Contract.Approve(&_ERC20ServiceChain.TransactOpts, spender, value) 2950 } 2951 2952 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 2953 // 2954 // Solidity: function approve(address spender, uint256 value) returns(bool) 2955 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 2956 return _ERC20ServiceChain.Contract.Approve(&_ERC20ServiceChain.TransactOpts, spender, value) 2957 } 2958 2959 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 2960 // 2961 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 2962 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 2963 return _ERC20ServiceChain.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 2964 } 2965 2966 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 2967 // 2968 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 2969 func (_ERC20ServiceChain *ERC20ServiceChainSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 2970 return _ERC20ServiceChain.Contract.DecreaseAllowance(&_ERC20ServiceChain.TransactOpts, spender, subtractedValue) 2971 } 2972 2973 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 2974 // 2975 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 2976 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 2977 return _ERC20ServiceChain.Contract.DecreaseAllowance(&_ERC20ServiceChain.TransactOpts, spender, subtractedValue) 2978 } 2979 2980 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 2981 // 2982 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 2983 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 2984 return _ERC20ServiceChain.contract.Transact(opts, "increaseAllowance", spender, addedValue) 2985 } 2986 2987 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 2988 // 2989 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 2990 func (_ERC20ServiceChain *ERC20ServiceChainSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 2991 return _ERC20ServiceChain.Contract.IncreaseAllowance(&_ERC20ServiceChain.TransactOpts, spender, addedValue) 2992 } 2993 2994 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 2995 // 2996 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 2997 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 2998 return _ERC20ServiceChain.Contract.IncreaseAllowance(&_ERC20ServiceChain.TransactOpts, spender, addedValue) 2999 } 3000 3001 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 3002 // 3003 // Solidity: function renounceOwnership() returns() 3004 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { 3005 return _ERC20ServiceChain.contract.Transact(opts, "renounceOwnership") 3006 } 3007 3008 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 3009 // 3010 // Solidity: function renounceOwnership() returns() 3011 func (_ERC20ServiceChain *ERC20ServiceChainSession) RenounceOwnership() (*types.Transaction, error) { 3012 return _ERC20ServiceChain.Contract.RenounceOwnership(&_ERC20ServiceChain.TransactOpts) 3013 } 3014 3015 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 3016 // 3017 // Solidity: function renounceOwnership() returns() 3018 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) RenounceOwnership() (*types.Transaction, error) { 3019 return _ERC20ServiceChain.Contract.RenounceOwnership(&_ERC20ServiceChain.TransactOpts) 3020 } 3021 3022 // RequestValueTransfer is a paid mutator transaction binding the contract method 0x3dc3c9e1. 3023 // 3024 // Solidity: function requestValueTransfer(uint256 _amount, address _to, uint256 _feeLimit, bytes _extraData) returns() 3025 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) RequestValueTransfer(opts *bind.TransactOpts, _amount *big.Int, _to common.Address, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 3026 return _ERC20ServiceChain.contract.Transact(opts, "requestValueTransfer", _amount, _to, _feeLimit, _extraData) 3027 } 3028 3029 // RequestValueTransfer is a paid mutator transaction binding the contract method 0x3dc3c9e1. 3030 // 3031 // Solidity: function requestValueTransfer(uint256 _amount, address _to, uint256 _feeLimit, bytes _extraData) returns() 3032 func (_ERC20ServiceChain *ERC20ServiceChainSession) RequestValueTransfer(_amount *big.Int, _to common.Address, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 3033 return _ERC20ServiceChain.Contract.RequestValueTransfer(&_ERC20ServiceChain.TransactOpts, _amount, _to, _feeLimit, _extraData) 3034 } 3035 3036 // RequestValueTransfer is a paid mutator transaction binding the contract method 0x3dc3c9e1. 3037 // 3038 // Solidity: function requestValueTransfer(uint256 _amount, address _to, uint256 _feeLimit, bytes _extraData) returns() 3039 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) RequestValueTransfer(_amount *big.Int, _to common.Address, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 3040 return _ERC20ServiceChain.Contract.RequestValueTransfer(&_ERC20ServiceChain.TransactOpts, _amount, _to, _feeLimit, _extraData) 3041 } 3042 3043 // SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. 3044 // 3045 // Solidity: function setBridge(address _bridge) returns() 3046 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) SetBridge(opts *bind.TransactOpts, _bridge common.Address) (*types.Transaction, error) { 3047 return _ERC20ServiceChain.contract.Transact(opts, "setBridge", _bridge) 3048 } 3049 3050 // SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. 3051 // 3052 // Solidity: function setBridge(address _bridge) returns() 3053 func (_ERC20ServiceChain *ERC20ServiceChainSession) SetBridge(_bridge common.Address) (*types.Transaction, error) { 3054 return _ERC20ServiceChain.Contract.SetBridge(&_ERC20ServiceChain.TransactOpts, _bridge) 3055 } 3056 3057 // SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. 3058 // 3059 // Solidity: function setBridge(address _bridge) returns() 3060 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) SetBridge(_bridge common.Address) (*types.Transaction, error) { 3061 return _ERC20ServiceChain.Contract.SetBridge(&_ERC20ServiceChain.TransactOpts, _bridge) 3062 } 3063 3064 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 3065 // 3066 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 3067 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3068 return _ERC20ServiceChain.contract.Transact(opts, "transfer", recipient, amount) 3069 } 3070 3071 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 3072 // 3073 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 3074 func (_ERC20ServiceChain *ERC20ServiceChainSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3075 return _ERC20ServiceChain.Contract.Transfer(&_ERC20ServiceChain.TransactOpts, recipient, amount) 3076 } 3077 3078 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 3079 // 3080 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 3081 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3082 return _ERC20ServiceChain.Contract.Transfer(&_ERC20ServiceChain.TransactOpts, recipient, amount) 3083 } 3084 3085 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 3086 // 3087 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 3088 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3089 return _ERC20ServiceChain.contract.Transact(opts, "transferFrom", sender, recipient, amount) 3090 } 3091 3092 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 3093 // 3094 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 3095 func (_ERC20ServiceChain *ERC20ServiceChainSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3096 return _ERC20ServiceChain.Contract.TransferFrom(&_ERC20ServiceChain.TransactOpts, sender, recipient, amount) 3097 } 3098 3099 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 3100 // 3101 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 3102 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3103 return _ERC20ServiceChain.Contract.TransferFrom(&_ERC20ServiceChain.TransactOpts, sender, recipient, amount) 3104 } 3105 3106 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 3107 // 3108 // Solidity: function transferOwnership(address newOwner) returns() 3109 func (_ERC20ServiceChain *ERC20ServiceChainTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { 3110 return _ERC20ServiceChain.contract.Transact(opts, "transferOwnership", newOwner) 3111 } 3112 3113 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 3114 // 3115 // Solidity: function transferOwnership(address newOwner) returns() 3116 func (_ERC20ServiceChain *ERC20ServiceChainSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 3117 return _ERC20ServiceChain.Contract.TransferOwnership(&_ERC20ServiceChain.TransactOpts, newOwner) 3118 } 3119 3120 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 3121 // 3122 // Solidity: function transferOwnership(address newOwner) returns() 3123 func (_ERC20ServiceChain *ERC20ServiceChainTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 3124 return _ERC20ServiceChain.Contract.TransferOwnership(&_ERC20ServiceChain.TransactOpts, newOwner) 3125 } 3126 3127 // ERC20ServiceChainApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20ServiceChain contract. 3128 type ERC20ServiceChainApprovalIterator struct { 3129 Event *ERC20ServiceChainApproval // Event containing the contract specifics and raw log 3130 3131 contract *bind.BoundContract // Generic contract to use for unpacking event data 3132 event string // Event name to use for unpacking event data 3133 3134 logs chan types.Log // Log channel receiving the found contract events 3135 sub klaytn.Subscription // Subscription for errors, completion and termination 3136 done bool // Whether the subscription completed delivering logs 3137 fail error // Occurred error to stop iteration 3138 } 3139 3140 // Next advances the iterator to the subsequent event, returning whether there 3141 // are any more events found. In case of a retrieval or parsing error, false is 3142 // returned and Error() can be queried for the exact failure. 3143 func (it *ERC20ServiceChainApprovalIterator) Next() bool { 3144 // If the iterator failed, stop iterating 3145 if it.fail != nil { 3146 return false 3147 } 3148 // If the iterator completed, deliver directly whatever's available 3149 if it.done { 3150 select { 3151 case log := <-it.logs: 3152 it.Event = new(ERC20ServiceChainApproval) 3153 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3154 it.fail = err 3155 return false 3156 } 3157 it.Event.Raw = log 3158 return true 3159 3160 default: 3161 return false 3162 } 3163 } 3164 // Iterator still in progress, wait for either a data or an error event 3165 select { 3166 case log := <-it.logs: 3167 it.Event = new(ERC20ServiceChainApproval) 3168 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3169 it.fail = err 3170 return false 3171 } 3172 it.Event.Raw = log 3173 return true 3174 3175 case err := <-it.sub.Err(): 3176 it.done = true 3177 it.fail = err 3178 return it.Next() 3179 } 3180 } 3181 3182 // Error returns any retrieval or parsing error occurred during filtering. 3183 func (it *ERC20ServiceChainApprovalIterator) Error() error { 3184 return it.fail 3185 } 3186 3187 // Close terminates the iteration process, releasing any pending underlying 3188 // resources. 3189 func (it *ERC20ServiceChainApprovalIterator) Close() error { 3190 it.sub.Unsubscribe() 3191 return nil 3192 } 3193 3194 // ERC20ServiceChainApproval represents a Approval event raised by the ERC20ServiceChain contract. 3195 type ERC20ServiceChainApproval struct { 3196 Owner common.Address 3197 Spender common.Address 3198 Value *big.Int 3199 Raw types.Log // Blockchain specific contextual infos 3200 } 3201 3202 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 3203 // 3204 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 3205 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ServiceChainApprovalIterator, error) { 3206 3207 var ownerRule []interface{} 3208 for _, ownerItem := range owner { 3209 ownerRule = append(ownerRule, ownerItem) 3210 } 3211 var spenderRule []interface{} 3212 for _, spenderItem := range spender { 3213 spenderRule = append(spenderRule, spenderItem) 3214 } 3215 3216 logs, sub, err := _ERC20ServiceChain.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 3217 if err != nil { 3218 return nil, err 3219 } 3220 return &ERC20ServiceChainApprovalIterator{contract: _ERC20ServiceChain.contract, event: "Approval", logs: logs, sub: sub}, nil 3221 } 3222 3223 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 3224 // 3225 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 3226 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20ServiceChainApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 3227 3228 var ownerRule []interface{} 3229 for _, ownerItem := range owner { 3230 ownerRule = append(ownerRule, ownerItem) 3231 } 3232 var spenderRule []interface{} 3233 for _, spenderItem := range spender { 3234 spenderRule = append(spenderRule, spenderItem) 3235 } 3236 3237 logs, sub, err := _ERC20ServiceChain.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 3238 if err != nil { 3239 return nil, err 3240 } 3241 return event.NewSubscription(func(quit <-chan struct{}) error { 3242 defer sub.Unsubscribe() 3243 for { 3244 select { 3245 case log := <-logs: 3246 // New log arrived, parse the event and forward to the user 3247 event := new(ERC20ServiceChainApproval) 3248 if err := _ERC20ServiceChain.contract.UnpackLog(event, "Approval", log); err != nil { 3249 return err 3250 } 3251 event.Raw = log 3252 3253 select { 3254 case sink <- event: 3255 case err := <-sub.Err(): 3256 return err 3257 case <-quit: 3258 return nil 3259 } 3260 case err := <-sub.Err(): 3261 return err 3262 case <-quit: 3263 return nil 3264 } 3265 } 3266 }), nil 3267 } 3268 3269 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 3270 // 3271 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 3272 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) ParseApproval(log types.Log) (*ERC20ServiceChainApproval, error) { 3273 event := new(ERC20ServiceChainApproval) 3274 if err := _ERC20ServiceChain.contract.UnpackLog(event, "Approval", log); err != nil { 3275 return nil, err 3276 } 3277 return event, nil 3278 } 3279 3280 // ERC20ServiceChainOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20ServiceChain contract. 3281 type ERC20ServiceChainOwnershipTransferredIterator struct { 3282 Event *ERC20ServiceChainOwnershipTransferred // Event containing the contract specifics and raw log 3283 3284 contract *bind.BoundContract // Generic contract to use for unpacking event data 3285 event string // Event name to use for unpacking event data 3286 3287 logs chan types.Log // Log channel receiving the found contract events 3288 sub klaytn.Subscription // Subscription for errors, completion and termination 3289 done bool // Whether the subscription completed delivering logs 3290 fail error // Occurred error to stop iteration 3291 } 3292 3293 // Next advances the iterator to the subsequent event, returning whether there 3294 // are any more events found. In case of a retrieval or parsing error, false is 3295 // returned and Error() can be queried for the exact failure. 3296 func (it *ERC20ServiceChainOwnershipTransferredIterator) Next() bool { 3297 // If the iterator failed, stop iterating 3298 if it.fail != nil { 3299 return false 3300 } 3301 // If the iterator completed, deliver directly whatever's available 3302 if it.done { 3303 select { 3304 case log := <-it.logs: 3305 it.Event = new(ERC20ServiceChainOwnershipTransferred) 3306 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3307 it.fail = err 3308 return false 3309 } 3310 it.Event.Raw = log 3311 return true 3312 3313 default: 3314 return false 3315 } 3316 } 3317 // Iterator still in progress, wait for either a data or an error event 3318 select { 3319 case log := <-it.logs: 3320 it.Event = new(ERC20ServiceChainOwnershipTransferred) 3321 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3322 it.fail = err 3323 return false 3324 } 3325 it.Event.Raw = log 3326 return true 3327 3328 case err := <-it.sub.Err(): 3329 it.done = true 3330 it.fail = err 3331 return it.Next() 3332 } 3333 } 3334 3335 // Error returns any retrieval or parsing error occurred during filtering. 3336 func (it *ERC20ServiceChainOwnershipTransferredIterator) Error() error { 3337 return it.fail 3338 } 3339 3340 // Close terminates the iteration process, releasing any pending underlying 3341 // resources. 3342 func (it *ERC20ServiceChainOwnershipTransferredIterator) Close() error { 3343 it.sub.Unsubscribe() 3344 return nil 3345 } 3346 3347 // ERC20ServiceChainOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20ServiceChain contract. 3348 type ERC20ServiceChainOwnershipTransferred struct { 3349 PreviousOwner common.Address 3350 NewOwner common.Address 3351 Raw types.Log // Blockchain specific contextual infos 3352 } 3353 3354 // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 3355 // 3356 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 3357 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20ServiceChainOwnershipTransferredIterator, error) { 3358 3359 var previousOwnerRule []interface{} 3360 for _, previousOwnerItem := range previousOwner { 3361 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 3362 } 3363 var newOwnerRule []interface{} 3364 for _, newOwnerItem := range newOwner { 3365 newOwnerRule = append(newOwnerRule, newOwnerItem) 3366 } 3367 3368 logs, sub, err := _ERC20ServiceChain.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 3369 if err != nil { 3370 return nil, err 3371 } 3372 return &ERC20ServiceChainOwnershipTransferredIterator{contract: _ERC20ServiceChain.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil 3373 } 3374 3375 // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 3376 // 3377 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 3378 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20ServiceChainOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { 3379 3380 var previousOwnerRule []interface{} 3381 for _, previousOwnerItem := range previousOwner { 3382 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 3383 } 3384 var newOwnerRule []interface{} 3385 for _, newOwnerItem := range newOwner { 3386 newOwnerRule = append(newOwnerRule, newOwnerItem) 3387 } 3388 3389 logs, sub, err := _ERC20ServiceChain.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 3390 if err != nil { 3391 return nil, err 3392 } 3393 return event.NewSubscription(func(quit <-chan struct{}) error { 3394 defer sub.Unsubscribe() 3395 for { 3396 select { 3397 case log := <-logs: 3398 // New log arrived, parse the event and forward to the user 3399 event := new(ERC20ServiceChainOwnershipTransferred) 3400 if err := _ERC20ServiceChain.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 3401 return err 3402 } 3403 event.Raw = log 3404 3405 select { 3406 case sink <- event: 3407 case err := <-sub.Err(): 3408 return err 3409 case <-quit: 3410 return nil 3411 } 3412 case err := <-sub.Err(): 3413 return err 3414 case <-quit: 3415 return nil 3416 } 3417 } 3418 }), nil 3419 } 3420 3421 // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 3422 // 3423 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 3424 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20ServiceChainOwnershipTransferred, error) { 3425 event := new(ERC20ServiceChainOwnershipTransferred) 3426 if err := _ERC20ServiceChain.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 3427 return nil, err 3428 } 3429 return event, nil 3430 } 3431 3432 // ERC20ServiceChainTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20ServiceChain contract. 3433 type ERC20ServiceChainTransferIterator struct { 3434 Event *ERC20ServiceChainTransfer // Event containing the contract specifics and raw log 3435 3436 contract *bind.BoundContract // Generic contract to use for unpacking event data 3437 event string // Event name to use for unpacking event data 3438 3439 logs chan types.Log // Log channel receiving the found contract events 3440 sub klaytn.Subscription // Subscription for errors, completion and termination 3441 done bool // Whether the subscription completed delivering logs 3442 fail error // Occurred error to stop iteration 3443 } 3444 3445 // Next advances the iterator to the subsequent event, returning whether there 3446 // are any more events found. In case of a retrieval or parsing error, false is 3447 // returned and Error() can be queried for the exact failure. 3448 func (it *ERC20ServiceChainTransferIterator) Next() bool { 3449 // If the iterator failed, stop iterating 3450 if it.fail != nil { 3451 return false 3452 } 3453 // If the iterator completed, deliver directly whatever's available 3454 if it.done { 3455 select { 3456 case log := <-it.logs: 3457 it.Event = new(ERC20ServiceChainTransfer) 3458 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3459 it.fail = err 3460 return false 3461 } 3462 it.Event.Raw = log 3463 return true 3464 3465 default: 3466 return false 3467 } 3468 } 3469 // Iterator still in progress, wait for either a data or an error event 3470 select { 3471 case log := <-it.logs: 3472 it.Event = new(ERC20ServiceChainTransfer) 3473 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3474 it.fail = err 3475 return false 3476 } 3477 it.Event.Raw = log 3478 return true 3479 3480 case err := <-it.sub.Err(): 3481 it.done = true 3482 it.fail = err 3483 return it.Next() 3484 } 3485 } 3486 3487 // Error returns any retrieval or parsing error occurred during filtering. 3488 func (it *ERC20ServiceChainTransferIterator) Error() error { 3489 return it.fail 3490 } 3491 3492 // Close terminates the iteration process, releasing any pending underlying 3493 // resources. 3494 func (it *ERC20ServiceChainTransferIterator) Close() error { 3495 it.sub.Unsubscribe() 3496 return nil 3497 } 3498 3499 // ERC20ServiceChainTransfer represents a Transfer event raised by the ERC20ServiceChain contract. 3500 type ERC20ServiceChainTransfer struct { 3501 From common.Address 3502 To common.Address 3503 Value *big.Int 3504 Raw types.Log // Blockchain specific contextual infos 3505 } 3506 3507 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 3508 // 3509 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 3510 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20ServiceChainTransferIterator, error) { 3511 3512 var fromRule []interface{} 3513 for _, fromItem := range from { 3514 fromRule = append(fromRule, fromItem) 3515 } 3516 var toRule []interface{} 3517 for _, toItem := range to { 3518 toRule = append(toRule, toItem) 3519 } 3520 3521 logs, sub, err := _ERC20ServiceChain.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 3522 if err != nil { 3523 return nil, err 3524 } 3525 return &ERC20ServiceChainTransferIterator{contract: _ERC20ServiceChain.contract, event: "Transfer", logs: logs, sub: sub}, nil 3526 } 3527 3528 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 3529 // 3530 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 3531 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20ServiceChainTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 3532 3533 var fromRule []interface{} 3534 for _, fromItem := range from { 3535 fromRule = append(fromRule, fromItem) 3536 } 3537 var toRule []interface{} 3538 for _, toItem := range to { 3539 toRule = append(toRule, toItem) 3540 } 3541 3542 logs, sub, err := _ERC20ServiceChain.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 3543 if err != nil { 3544 return nil, err 3545 } 3546 return event.NewSubscription(func(quit <-chan struct{}) error { 3547 defer sub.Unsubscribe() 3548 for { 3549 select { 3550 case log := <-logs: 3551 // New log arrived, parse the event and forward to the user 3552 event := new(ERC20ServiceChainTransfer) 3553 if err := _ERC20ServiceChain.contract.UnpackLog(event, "Transfer", log); err != nil { 3554 return err 3555 } 3556 event.Raw = log 3557 3558 select { 3559 case sink <- event: 3560 case err := <-sub.Err(): 3561 return err 3562 case <-quit: 3563 return nil 3564 } 3565 case err := <-sub.Err(): 3566 return err 3567 case <-quit: 3568 return nil 3569 } 3570 } 3571 }), nil 3572 } 3573 3574 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 3575 // 3576 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 3577 func (_ERC20ServiceChain *ERC20ServiceChainFilterer) ParseTransfer(log types.Log) (*ERC20ServiceChainTransfer, error) { 3578 event := new(ERC20ServiceChainTransfer) 3579 if err := _ERC20ServiceChain.contract.UnpackLog(event, "Transfer", log); err != nil { 3580 return nil, err 3581 } 3582 return event, nil 3583 } 3584 3585 // IERC20ABI is the input ABI used to generate the binding from. 3586 const IERC20ABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" 3587 3588 // IERC20BinRuntime is the compiled bytecode used for adding genesis block without deploying code. 3589 const IERC20BinRuntime = `` 3590 3591 // IERC20FuncSigs maps the 4-byte function signature to its string representation. 3592 var IERC20FuncSigs = map[string]string{ 3593 "dd62ed3e": "allowance(address,address)", 3594 "095ea7b3": "approve(address,uint256)", 3595 "70a08231": "balanceOf(address)", 3596 "18160ddd": "totalSupply()", 3597 "a9059cbb": "transfer(address,uint256)", 3598 "23b872dd": "transferFrom(address,address,uint256)", 3599 } 3600 3601 // IERC20 is an auto generated Go binding around a Klaytn contract. 3602 type IERC20 struct { 3603 IERC20Caller // Read-only binding to the contract 3604 IERC20Transactor // Write-only binding to the contract 3605 IERC20Filterer // Log filterer for contract events 3606 } 3607 3608 // IERC20Caller is an auto generated read-only Go binding around a Klaytn contract. 3609 type IERC20Caller struct { 3610 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3611 } 3612 3613 // IERC20Transactor is an auto generated write-only Go binding around a Klaytn contract. 3614 type IERC20Transactor struct { 3615 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3616 } 3617 3618 // IERC20Filterer is an auto generated log filtering Go binding around a Klaytn contract events. 3619 type IERC20Filterer struct { 3620 contract *bind.BoundContract // Generic contract wrapper for the low level calls 3621 } 3622 3623 // IERC20Session is an auto generated Go binding around a Klaytn contract, 3624 // with pre-set call and transact options. 3625 type IERC20Session struct { 3626 Contract *IERC20 // Generic contract binding to set the session for 3627 CallOpts bind.CallOpts // Call options to use throughout this session 3628 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 3629 } 3630 3631 // IERC20CallerSession is an auto generated read-only Go binding around a Klaytn contract, 3632 // with pre-set call options. 3633 type IERC20CallerSession struct { 3634 Contract *IERC20Caller // Generic contract caller binding to set the session for 3635 CallOpts bind.CallOpts // Call options to use throughout this session 3636 } 3637 3638 // IERC20TransactorSession is an auto generated write-only Go binding around a Klaytn contract, 3639 // with pre-set transact options. 3640 type IERC20TransactorSession struct { 3641 Contract *IERC20Transactor // Generic contract transactor binding to set the session for 3642 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 3643 } 3644 3645 // IERC20Raw is an auto generated low-level Go binding around a Klaytn contract. 3646 type IERC20Raw struct { 3647 Contract *IERC20 // Generic contract binding to access the raw methods on 3648 } 3649 3650 // IERC20CallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 3651 type IERC20CallerRaw struct { 3652 Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on 3653 } 3654 3655 // IERC20TransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 3656 type IERC20TransactorRaw struct { 3657 Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on 3658 } 3659 3660 // NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. 3661 func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { 3662 contract, err := bindIERC20(address, backend, backend, backend) 3663 if err != nil { 3664 return nil, err 3665 } 3666 return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil 3667 } 3668 3669 // NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. 3670 func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { 3671 contract, err := bindIERC20(address, caller, nil, nil) 3672 if err != nil { 3673 return nil, err 3674 } 3675 return &IERC20Caller{contract: contract}, nil 3676 } 3677 3678 // NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. 3679 func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { 3680 contract, err := bindIERC20(address, nil, transactor, nil) 3681 if err != nil { 3682 return nil, err 3683 } 3684 return &IERC20Transactor{contract: contract}, nil 3685 } 3686 3687 // NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. 3688 func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { 3689 contract, err := bindIERC20(address, nil, nil, filterer) 3690 if err != nil { 3691 return nil, err 3692 } 3693 return &IERC20Filterer{contract: contract}, nil 3694 } 3695 3696 // bindIERC20 binds a generic wrapper to an already deployed contract. 3697 func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 3698 parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) 3699 if err != nil { 3700 return nil, err 3701 } 3702 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 3703 } 3704 3705 // Call invokes the (constant) contract method with params as input values and 3706 // sets the output to result. The result type might be a single field for simple 3707 // returns, a slice of interfaces for anonymous returns and a struct for named 3708 // returns. 3709 func (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 3710 return _IERC20.Contract.IERC20Caller.contract.Call(opts, result, method, params...) 3711 } 3712 3713 // Transfer initiates a plain transaction to move funds to the contract, calling 3714 // its default method if one is available. 3715 func (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 3716 return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) 3717 } 3718 3719 // Transact invokes the (paid) contract method with params as input values. 3720 func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 3721 return _IERC20.Contract.IERC20Transactor.contract.Transact(opts, method, params...) 3722 } 3723 3724 // Call invokes the (constant) contract method with params as input values and 3725 // sets the output to result. The result type might be a single field for simple 3726 // returns, a slice of interfaces for anonymous returns and a struct for named 3727 // returns. 3728 func (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 3729 return _IERC20.Contract.contract.Call(opts, result, method, params...) 3730 } 3731 3732 // Transfer initiates a plain transaction to move funds to the contract, calling 3733 // its default method if one is available. 3734 func (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 3735 return _IERC20.Contract.contract.Transfer(opts) 3736 } 3737 3738 // Transact invokes the (paid) contract method with params as input values. 3739 func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 3740 return _IERC20.Contract.contract.Transact(opts, method, params...) 3741 } 3742 3743 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 3744 // 3745 // Solidity: function allowance(address owner, address spender) view returns(uint256) 3746 func (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 3747 var ( 3748 ret0 = new(*big.Int) 3749 ) 3750 out := ret0 3751 err := _IERC20.contract.Call(opts, out, "allowance", owner, spender) 3752 return *ret0, err 3753 } 3754 3755 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 3756 // 3757 // Solidity: function allowance(address owner, address spender) view returns(uint256) 3758 func (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 3759 return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) 3760 } 3761 3762 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 3763 // 3764 // Solidity: function allowance(address owner, address spender) view returns(uint256) 3765 func (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 3766 return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) 3767 } 3768 3769 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 3770 // 3771 // Solidity: function balanceOf(address account) view returns(uint256) 3772 func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 3773 var ( 3774 ret0 = new(*big.Int) 3775 ) 3776 out := ret0 3777 err := _IERC20.contract.Call(opts, out, "balanceOf", account) 3778 return *ret0, err 3779 } 3780 3781 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 3782 // 3783 // Solidity: function balanceOf(address account) view returns(uint256) 3784 func (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { 3785 return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) 3786 } 3787 3788 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 3789 // 3790 // Solidity: function balanceOf(address account) view returns(uint256) 3791 func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { 3792 return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) 3793 } 3794 3795 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 3796 // 3797 // Solidity: function totalSupply() view returns(uint256) 3798 func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 3799 var ( 3800 ret0 = new(*big.Int) 3801 ) 3802 out := ret0 3803 err := _IERC20.contract.Call(opts, out, "totalSupply") 3804 return *ret0, err 3805 } 3806 3807 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 3808 // 3809 // Solidity: function totalSupply() view returns(uint256) 3810 func (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { 3811 return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) 3812 } 3813 3814 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 3815 // 3816 // Solidity: function totalSupply() view returns(uint256) 3817 func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { 3818 return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) 3819 } 3820 3821 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 3822 // 3823 // Solidity: function approve(address spender, uint256 amount) returns(bool) 3824 func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { 3825 return _IERC20.contract.Transact(opts, "approve", spender, amount) 3826 } 3827 3828 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 3829 // 3830 // Solidity: function approve(address spender, uint256 amount) returns(bool) 3831 func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 3832 return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) 3833 } 3834 3835 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 3836 // 3837 // Solidity: function approve(address spender, uint256 amount) returns(bool) 3838 func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { 3839 return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) 3840 } 3841 3842 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 3843 // 3844 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 3845 func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3846 return _IERC20.contract.Transact(opts, "transfer", recipient, amount) 3847 } 3848 3849 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 3850 // 3851 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 3852 func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3853 return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) 3854 } 3855 3856 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 3857 // 3858 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 3859 func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3860 return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) 3861 } 3862 3863 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 3864 // 3865 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 3866 func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3867 return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) 3868 } 3869 3870 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 3871 // 3872 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 3873 func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3874 return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) 3875 } 3876 3877 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 3878 // 3879 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 3880 func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 3881 return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) 3882 } 3883 3884 // 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. 3885 type IERC20ApprovalIterator struct { 3886 Event *IERC20Approval // Event containing the contract specifics and raw log 3887 3888 contract *bind.BoundContract // Generic contract to use for unpacking event data 3889 event string // Event name to use for unpacking event data 3890 3891 logs chan types.Log // Log channel receiving the found contract events 3892 sub klaytn.Subscription // Subscription for errors, completion and termination 3893 done bool // Whether the subscription completed delivering logs 3894 fail error // Occurred error to stop iteration 3895 } 3896 3897 // Next advances the iterator to the subsequent event, returning whether there 3898 // are any more events found. In case of a retrieval or parsing error, false is 3899 // returned and Error() can be queried for the exact failure. 3900 func (it *IERC20ApprovalIterator) Next() bool { 3901 // If the iterator failed, stop iterating 3902 if it.fail != nil { 3903 return false 3904 } 3905 // If the iterator completed, deliver directly whatever's available 3906 if it.done { 3907 select { 3908 case log := <-it.logs: 3909 it.Event = new(IERC20Approval) 3910 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3911 it.fail = err 3912 return false 3913 } 3914 it.Event.Raw = log 3915 return true 3916 3917 default: 3918 return false 3919 } 3920 } 3921 // Iterator still in progress, wait for either a data or an error event 3922 select { 3923 case log := <-it.logs: 3924 it.Event = new(IERC20Approval) 3925 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 3926 it.fail = err 3927 return false 3928 } 3929 it.Event.Raw = log 3930 return true 3931 3932 case err := <-it.sub.Err(): 3933 it.done = true 3934 it.fail = err 3935 return it.Next() 3936 } 3937 } 3938 3939 // Error returns any retrieval or parsing error occurred during filtering. 3940 func (it *IERC20ApprovalIterator) Error() error { 3941 return it.fail 3942 } 3943 3944 // Close terminates the iteration process, releasing any pending underlying 3945 // resources. 3946 func (it *IERC20ApprovalIterator) Close() error { 3947 it.sub.Unsubscribe() 3948 return nil 3949 } 3950 3951 // IERC20Approval represents a Approval event raised by the IERC20 contract. 3952 type IERC20Approval struct { 3953 Owner common.Address 3954 Spender common.Address 3955 Value *big.Int 3956 Raw types.Log // Blockchain specific contextual infos 3957 } 3958 3959 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 3960 // 3961 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 3962 func (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, error) { 3963 3964 var ownerRule []interface{} 3965 for _, ownerItem := range owner { 3966 ownerRule = append(ownerRule, ownerItem) 3967 } 3968 var spenderRule []interface{} 3969 for _, spenderItem := range spender { 3970 spenderRule = append(spenderRule, spenderItem) 3971 } 3972 3973 logs, sub, err := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 3974 if err != nil { 3975 return nil, err 3976 } 3977 return &IERC20ApprovalIterator{contract: _IERC20.contract, event: "Approval", logs: logs, sub: sub}, nil 3978 } 3979 3980 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 3981 // 3982 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 3983 func (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 3984 3985 var ownerRule []interface{} 3986 for _, ownerItem := range owner { 3987 ownerRule = append(ownerRule, ownerItem) 3988 } 3989 var spenderRule []interface{} 3990 for _, spenderItem := range spender { 3991 spenderRule = append(spenderRule, spenderItem) 3992 } 3993 3994 logs, sub, err := _IERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 3995 if err != nil { 3996 return nil, err 3997 } 3998 return event.NewSubscription(func(quit <-chan struct{}) error { 3999 defer sub.Unsubscribe() 4000 for { 4001 select { 4002 case log := <-logs: 4003 // New log arrived, parse the event and forward to the user 4004 event := new(IERC20Approval) 4005 if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { 4006 return err 4007 } 4008 event.Raw = log 4009 4010 select { 4011 case sink <- event: 4012 case err := <-sub.Err(): 4013 return err 4014 case <-quit: 4015 return nil 4016 } 4017 case err := <-sub.Err(): 4018 return err 4019 case <-quit: 4020 return nil 4021 } 4022 } 4023 }), nil 4024 } 4025 4026 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 4027 // 4028 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 4029 func (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { 4030 event := new(IERC20Approval) 4031 if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { 4032 return nil, err 4033 } 4034 return event, nil 4035 } 4036 4037 // 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. 4038 type IERC20TransferIterator struct { 4039 Event *IERC20Transfer // Event containing the contract specifics and raw log 4040 4041 contract *bind.BoundContract // Generic contract to use for unpacking event data 4042 event string // Event name to use for unpacking event data 4043 4044 logs chan types.Log // Log channel receiving the found contract events 4045 sub klaytn.Subscription // Subscription for errors, completion and termination 4046 done bool // Whether the subscription completed delivering logs 4047 fail error // Occurred error to stop iteration 4048 } 4049 4050 // Next advances the iterator to the subsequent event, returning whether there 4051 // are any more events found. In case of a retrieval or parsing error, false is 4052 // returned and Error() can be queried for the exact failure. 4053 func (it *IERC20TransferIterator) Next() bool { 4054 // If the iterator failed, stop iterating 4055 if it.fail != nil { 4056 return false 4057 } 4058 // If the iterator completed, deliver directly whatever's available 4059 if it.done { 4060 select { 4061 case log := <-it.logs: 4062 it.Event = new(IERC20Transfer) 4063 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 4064 it.fail = err 4065 return false 4066 } 4067 it.Event.Raw = log 4068 return true 4069 4070 default: 4071 return false 4072 } 4073 } 4074 // Iterator still in progress, wait for either a data or an error event 4075 select { 4076 case log := <-it.logs: 4077 it.Event = new(IERC20Transfer) 4078 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 4079 it.fail = err 4080 return false 4081 } 4082 it.Event.Raw = log 4083 return true 4084 4085 case err := <-it.sub.Err(): 4086 it.done = true 4087 it.fail = err 4088 return it.Next() 4089 } 4090 } 4091 4092 // Error returns any retrieval or parsing error occurred during filtering. 4093 func (it *IERC20TransferIterator) Error() error { 4094 return it.fail 4095 } 4096 4097 // Close terminates the iteration process, releasing any pending underlying 4098 // resources. 4099 func (it *IERC20TransferIterator) Close() error { 4100 it.sub.Unsubscribe() 4101 return nil 4102 } 4103 4104 // IERC20Transfer represents a Transfer event raised by the IERC20 contract. 4105 type IERC20Transfer struct { 4106 From common.Address 4107 To common.Address 4108 Value *big.Int 4109 Raw types.Log // Blockchain specific contextual infos 4110 } 4111 4112 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 4113 // 4114 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 4115 func (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, error) { 4116 4117 var fromRule []interface{} 4118 for _, fromItem := range from { 4119 fromRule = append(fromRule, fromItem) 4120 } 4121 var toRule []interface{} 4122 for _, toItem := range to { 4123 toRule = append(toRule, toItem) 4124 } 4125 4126 logs, sub, err := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 4127 if err != nil { 4128 return nil, err 4129 } 4130 return &IERC20TransferIterator{contract: _IERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil 4131 } 4132 4133 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 4134 // 4135 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 4136 func (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { 4137 4138 var fromRule []interface{} 4139 for _, fromItem := range from { 4140 fromRule = append(fromRule, fromItem) 4141 } 4142 var toRule []interface{} 4143 for _, toItem := range to { 4144 toRule = append(toRule, toItem) 4145 } 4146 4147 logs, sub, err := _IERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 4148 if err != nil { 4149 return nil, err 4150 } 4151 return event.NewSubscription(func(quit <-chan struct{}) error { 4152 defer sub.Unsubscribe() 4153 for { 4154 select { 4155 case log := <-logs: 4156 // New log arrived, parse the event and forward to the user 4157 event := new(IERC20Transfer) 4158 if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 4159 return err 4160 } 4161 event.Raw = log 4162 4163 select { 4164 case sink <- event: 4165 case err := <-sub.Err(): 4166 return err 4167 case <-quit: 4168 return nil 4169 } 4170 case err := <-sub.Err(): 4171 return err 4172 case <-quit: 4173 return nil 4174 } 4175 } 4176 }), nil 4177 } 4178 4179 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 4180 // 4181 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 4182 func (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { 4183 event := new(IERC20Transfer) 4184 if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { 4185 return nil, err 4186 } 4187 return event, nil 4188 } 4189 4190 // IERC20BridgeReceiverABI is the input ABI used to generate the binding from. 4191 const IERC20BridgeReceiverABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_feeLimit\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"onERC20Received\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" 4192 4193 // IERC20BridgeReceiverBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 4194 const IERC20BridgeReceiverBinRuntime = `` 4195 4196 // IERC20BridgeReceiverFuncSigs maps the 4-byte function signature to its string representation. 4197 var IERC20BridgeReceiverFuncSigs = map[string]string{ 4198 "f1656e53": "onERC20Received(address,address,uint256,uint256,bytes)", 4199 } 4200 4201 // IERC20BridgeReceiver is an auto generated Go binding around a Klaytn contract. 4202 type IERC20BridgeReceiver struct { 4203 IERC20BridgeReceiverCaller // Read-only binding to the contract 4204 IERC20BridgeReceiverTransactor // Write-only binding to the contract 4205 IERC20BridgeReceiverFilterer // Log filterer for contract events 4206 } 4207 4208 // IERC20BridgeReceiverCaller is an auto generated read-only Go binding around a Klaytn contract. 4209 type IERC20BridgeReceiverCaller struct { 4210 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4211 } 4212 4213 // IERC20BridgeReceiverTransactor is an auto generated write-only Go binding around a Klaytn contract. 4214 type IERC20BridgeReceiverTransactor struct { 4215 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4216 } 4217 4218 // IERC20BridgeReceiverFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 4219 type IERC20BridgeReceiverFilterer struct { 4220 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4221 } 4222 4223 // IERC20BridgeReceiverSession is an auto generated Go binding around a Klaytn contract, 4224 // with pre-set call and transact options. 4225 type IERC20BridgeReceiverSession struct { 4226 Contract *IERC20BridgeReceiver // Generic contract binding to set the session for 4227 CallOpts bind.CallOpts // Call options to use throughout this session 4228 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 4229 } 4230 4231 // IERC20BridgeReceiverCallerSession is an auto generated read-only Go binding around a Klaytn contract, 4232 // with pre-set call options. 4233 type IERC20BridgeReceiverCallerSession struct { 4234 Contract *IERC20BridgeReceiverCaller // Generic contract caller binding to set the session for 4235 CallOpts bind.CallOpts // Call options to use throughout this session 4236 } 4237 4238 // IERC20BridgeReceiverTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 4239 // with pre-set transact options. 4240 type IERC20BridgeReceiverTransactorSession struct { 4241 Contract *IERC20BridgeReceiverTransactor // Generic contract transactor binding to set the session for 4242 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 4243 } 4244 4245 // IERC20BridgeReceiverRaw is an auto generated low-level Go binding around a Klaytn contract. 4246 type IERC20BridgeReceiverRaw struct { 4247 Contract *IERC20BridgeReceiver // Generic contract binding to access the raw methods on 4248 } 4249 4250 // IERC20BridgeReceiverCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 4251 type IERC20BridgeReceiverCallerRaw struct { 4252 Contract *IERC20BridgeReceiverCaller // Generic read-only contract binding to access the raw methods on 4253 } 4254 4255 // IERC20BridgeReceiverTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 4256 type IERC20BridgeReceiverTransactorRaw struct { 4257 Contract *IERC20BridgeReceiverTransactor // Generic write-only contract binding to access the raw methods on 4258 } 4259 4260 // NewIERC20BridgeReceiver creates a new instance of IERC20BridgeReceiver, bound to a specific deployed contract. 4261 func NewIERC20BridgeReceiver(address common.Address, backend bind.ContractBackend) (*IERC20BridgeReceiver, error) { 4262 contract, err := bindIERC20BridgeReceiver(address, backend, backend, backend) 4263 if err != nil { 4264 return nil, err 4265 } 4266 return &IERC20BridgeReceiver{IERC20BridgeReceiverCaller: IERC20BridgeReceiverCaller{contract: contract}, IERC20BridgeReceiverTransactor: IERC20BridgeReceiverTransactor{contract: contract}, IERC20BridgeReceiverFilterer: IERC20BridgeReceiverFilterer{contract: contract}}, nil 4267 } 4268 4269 // NewIERC20BridgeReceiverCaller creates a new read-only instance of IERC20BridgeReceiver, bound to a specific deployed contract. 4270 func NewIERC20BridgeReceiverCaller(address common.Address, caller bind.ContractCaller) (*IERC20BridgeReceiverCaller, error) { 4271 contract, err := bindIERC20BridgeReceiver(address, caller, nil, nil) 4272 if err != nil { 4273 return nil, err 4274 } 4275 return &IERC20BridgeReceiverCaller{contract: contract}, nil 4276 } 4277 4278 // NewIERC20BridgeReceiverTransactor creates a new write-only instance of IERC20BridgeReceiver, bound to a specific deployed contract. 4279 func NewIERC20BridgeReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*IERC20BridgeReceiverTransactor, error) { 4280 contract, err := bindIERC20BridgeReceiver(address, nil, transactor, nil) 4281 if err != nil { 4282 return nil, err 4283 } 4284 return &IERC20BridgeReceiverTransactor{contract: contract}, nil 4285 } 4286 4287 // NewIERC20BridgeReceiverFilterer creates a new log filterer instance of IERC20BridgeReceiver, bound to a specific deployed contract. 4288 func NewIERC20BridgeReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*IERC20BridgeReceiverFilterer, error) { 4289 contract, err := bindIERC20BridgeReceiver(address, nil, nil, filterer) 4290 if err != nil { 4291 return nil, err 4292 } 4293 return &IERC20BridgeReceiverFilterer{contract: contract}, nil 4294 } 4295 4296 // bindIERC20BridgeReceiver binds a generic wrapper to an already deployed contract. 4297 func bindIERC20BridgeReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 4298 parsed, err := abi.JSON(strings.NewReader(IERC20BridgeReceiverABI)) 4299 if err != nil { 4300 return nil, err 4301 } 4302 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 4303 } 4304 4305 // Call invokes the (constant) contract method with params as input values and 4306 // sets the output to result. The result type might be a single field for simple 4307 // returns, a slice of interfaces for anonymous returns and a struct for named 4308 // returns. 4309 func (_IERC20BridgeReceiver *IERC20BridgeReceiverRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 4310 return _IERC20BridgeReceiver.Contract.IERC20BridgeReceiverCaller.contract.Call(opts, result, method, params...) 4311 } 4312 4313 // Transfer initiates a plain transaction to move funds to the contract, calling 4314 // its default method if one is available. 4315 func (_IERC20BridgeReceiver *IERC20BridgeReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 4316 return _IERC20BridgeReceiver.Contract.IERC20BridgeReceiverTransactor.contract.Transfer(opts) 4317 } 4318 4319 // Transact invokes the (paid) contract method with params as input values. 4320 func (_IERC20BridgeReceiver *IERC20BridgeReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 4321 return _IERC20BridgeReceiver.Contract.IERC20BridgeReceiverTransactor.contract.Transact(opts, method, params...) 4322 } 4323 4324 // Call invokes the (constant) contract method with params as input values and 4325 // sets the output to result. The result type might be a single field for simple 4326 // returns, a slice of interfaces for anonymous returns and a struct for named 4327 // returns. 4328 func (_IERC20BridgeReceiver *IERC20BridgeReceiverCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 4329 return _IERC20BridgeReceiver.Contract.contract.Call(opts, result, method, params...) 4330 } 4331 4332 // Transfer initiates a plain transaction to move funds to the contract, calling 4333 // its default method if one is available. 4334 func (_IERC20BridgeReceiver *IERC20BridgeReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 4335 return _IERC20BridgeReceiver.Contract.contract.Transfer(opts) 4336 } 4337 4338 // Transact invokes the (paid) contract method with params as input values. 4339 func (_IERC20BridgeReceiver *IERC20BridgeReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 4340 return _IERC20BridgeReceiver.Contract.contract.Transact(opts, method, params...) 4341 } 4342 4343 // OnERC20Received is a paid mutator transaction binding the contract method 0xf1656e53. 4344 // 4345 // Solidity: function onERC20Received(address _from, address _to, uint256 _amount, uint256 _feeLimit, bytes _extraData) returns() 4346 func (_IERC20BridgeReceiver *IERC20BridgeReceiverTransactor) OnERC20Received(opts *bind.TransactOpts, _from common.Address, _to common.Address, _amount *big.Int, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 4347 return _IERC20BridgeReceiver.contract.Transact(opts, "onERC20Received", _from, _to, _amount, _feeLimit, _extraData) 4348 } 4349 4350 // OnERC20Received is a paid mutator transaction binding the contract method 0xf1656e53. 4351 // 4352 // Solidity: function onERC20Received(address _from, address _to, uint256 _amount, uint256 _feeLimit, bytes _extraData) returns() 4353 func (_IERC20BridgeReceiver *IERC20BridgeReceiverSession) OnERC20Received(_from common.Address, _to common.Address, _amount *big.Int, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 4354 return _IERC20BridgeReceiver.Contract.OnERC20Received(&_IERC20BridgeReceiver.TransactOpts, _from, _to, _amount, _feeLimit, _extraData) 4355 } 4356 4357 // OnERC20Received is a paid mutator transaction binding the contract method 0xf1656e53. 4358 // 4359 // Solidity: function onERC20Received(address _from, address _to, uint256 _amount, uint256 _feeLimit, bytes _extraData) returns() 4360 func (_IERC20BridgeReceiver *IERC20BridgeReceiverTransactorSession) OnERC20Received(_from common.Address, _to common.Address, _amount *big.Int, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 4361 return _IERC20BridgeReceiver.Contract.OnERC20Received(&_IERC20BridgeReceiver.TransactOpts, _from, _to, _amount, _feeLimit, _extraData) 4362 } 4363 4364 // MinterRoleABI is the input ABI used to generate the binding from. 4365 const MinterRoleABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterRemoved\",\"type\":\"event\"}]" 4366 4367 // MinterRoleBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 4368 const MinterRoleBinRuntime = `` 4369 4370 // MinterRoleFuncSigs maps the 4-byte function signature to its string representation. 4371 var MinterRoleFuncSigs = map[string]string{ 4372 "983b2d56": "addMinter(address)", 4373 "aa271e1a": "isMinter(address)", 4374 "98650275": "renounceMinter()", 4375 } 4376 4377 // MinterRole is an auto generated Go binding around a Klaytn contract. 4378 type MinterRole struct { 4379 MinterRoleCaller // Read-only binding to the contract 4380 MinterRoleTransactor // Write-only binding to the contract 4381 MinterRoleFilterer // Log filterer for contract events 4382 } 4383 4384 // MinterRoleCaller is an auto generated read-only Go binding around a Klaytn contract. 4385 type MinterRoleCaller struct { 4386 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4387 } 4388 4389 // MinterRoleTransactor is an auto generated write-only Go binding around a Klaytn contract. 4390 type MinterRoleTransactor struct { 4391 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4392 } 4393 4394 // MinterRoleFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 4395 type MinterRoleFilterer struct { 4396 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4397 } 4398 4399 // MinterRoleSession is an auto generated Go binding around a Klaytn contract, 4400 // with pre-set call and transact options. 4401 type MinterRoleSession struct { 4402 Contract *MinterRole // Generic contract binding to set the session for 4403 CallOpts bind.CallOpts // Call options to use throughout this session 4404 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 4405 } 4406 4407 // MinterRoleCallerSession is an auto generated read-only Go binding around a Klaytn contract, 4408 // with pre-set call options. 4409 type MinterRoleCallerSession struct { 4410 Contract *MinterRoleCaller // Generic contract caller binding to set the session for 4411 CallOpts bind.CallOpts // Call options to use throughout this session 4412 } 4413 4414 // MinterRoleTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 4415 // with pre-set transact options. 4416 type MinterRoleTransactorSession struct { 4417 Contract *MinterRoleTransactor // Generic contract transactor binding to set the session for 4418 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 4419 } 4420 4421 // MinterRoleRaw is an auto generated low-level Go binding around a Klaytn contract. 4422 type MinterRoleRaw struct { 4423 Contract *MinterRole // Generic contract binding to access the raw methods on 4424 } 4425 4426 // MinterRoleCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 4427 type MinterRoleCallerRaw struct { 4428 Contract *MinterRoleCaller // Generic read-only contract binding to access the raw methods on 4429 } 4430 4431 // MinterRoleTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 4432 type MinterRoleTransactorRaw struct { 4433 Contract *MinterRoleTransactor // Generic write-only contract binding to access the raw methods on 4434 } 4435 4436 // NewMinterRole creates a new instance of MinterRole, bound to a specific deployed contract. 4437 func NewMinterRole(address common.Address, backend bind.ContractBackend) (*MinterRole, error) { 4438 contract, err := bindMinterRole(address, backend, backend, backend) 4439 if err != nil { 4440 return nil, err 4441 } 4442 return &MinterRole{MinterRoleCaller: MinterRoleCaller{contract: contract}, MinterRoleTransactor: MinterRoleTransactor{contract: contract}, MinterRoleFilterer: MinterRoleFilterer{contract: contract}}, nil 4443 } 4444 4445 // NewMinterRoleCaller creates a new read-only instance of MinterRole, bound to a specific deployed contract. 4446 func NewMinterRoleCaller(address common.Address, caller bind.ContractCaller) (*MinterRoleCaller, error) { 4447 contract, err := bindMinterRole(address, caller, nil, nil) 4448 if err != nil { 4449 return nil, err 4450 } 4451 return &MinterRoleCaller{contract: contract}, nil 4452 } 4453 4454 // NewMinterRoleTransactor creates a new write-only instance of MinterRole, bound to a specific deployed contract. 4455 func NewMinterRoleTransactor(address common.Address, transactor bind.ContractTransactor) (*MinterRoleTransactor, error) { 4456 contract, err := bindMinterRole(address, nil, transactor, nil) 4457 if err != nil { 4458 return nil, err 4459 } 4460 return &MinterRoleTransactor{contract: contract}, nil 4461 } 4462 4463 // NewMinterRoleFilterer creates a new log filterer instance of MinterRole, bound to a specific deployed contract. 4464 func NewMinterRoleFilterer(address common.Address, filterer bind.ContractFilterer) (*MinterRoleFilterer, error) { 4465 contract, err := bindMinterRole(address, nil, nil, filterer) 4466 if err != nil { 4467 return nil, err 4468 } 4469 return &MinterRoleFilterer{contract: contract}, nil 4470 } 4471 4472 // bindMinterRole binds a generic wrapper to an already deployed contract. 4473 func bindMinterRole(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 4474 parsed, err := abi.JSON(strings.NewReader(MinterRoleABI)) 4475 if err != nil { 4476 return nil, err 4477 } 4478 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 4479 } 4480 4481 // Call invokes the (constant) contract method with params as input values and 4482 // sets the output to result. The result type might be a single field for simple 4483 // returns, a slice of interfaces for anonymous returns and a struct for named 4484 // returns. 4485 func (_MinterRole *MinterRoleRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 4486 return _MinterRole.Contract.MinterRoleCaller.contract.Call(opts, result, method, params...) 4487 } 4488 4489 // Transfer initiates a plain transaction to move funds to the contract, calling 4490 // its default method if one is available. 4491 func (_MinterRole *MinterRoleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 4492 return _MinterRole.Contract.MinterRoleTransactor.contract.Transfer(opts) 4493 } 4494 4495 // Transact invokes the (paid) contract method with params as input values. 4496 func (_MinterRole *MinterRoleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 4497 return _MinterRole.Contract.MinterRoleTransactor.contract.Transact(opts, method, params...) 4498 } 4499 4500 // Call invokes the (constant) contract method with params as input values and 4501 // sets the output to result. The result type might be a single field for simple 4502 // returns, a slice of interfaces for anonymous returns and a struct for named 4503 // returns. 4504 func (_MinterRole *MinterRoleCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 4505 return _MinterRole.Contract.contract.Call(opts, result, method, params...) 4506 } 4507 4508 // Transfer initiates a plain transaction to move funds to the contract, calling 4509 // its default method if one is available. 4510 func (_MinterRole *MinterRoleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 4511 return _MinterRole.Contract.contract.Transfer(opts) 4512 } 4513 4514 // Transact invokes the (paid) contract method with params as input values. 4515 func (_MinterRole *MinterRoleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 4516 return _MinterRole.Contract.contract.Transact(opts, method, params...) 4517 } 4518 4519 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 4520 // 4521 // Solidity: function isMinter(address account) view returns(bool) 4522 func (_MinterRole *MinterRoleCaller) IsMinter(opts *bind.CallOpts, account common.Address) (bool, error) { 4523 var ( 4524 ret0 = new(bool) 4525 ) 4526 out := ret0 4527 err := _MinterRole.contract.Call(opts, out, "isMinter", account) 4528 return *ret0, err 4529 } 4530 4531 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 4532 // 4533 // Solidity: function isMinter(address account) view returns(bool) 4534 func (_MinterRole *MinterRoleSession) IsMinter(account common.Address) (bool, error) { 4535 return _MinterRole.Contract.IsMinter(&_MinterRole.CallOpts, account) 4536 } 4537 4538 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 4539 // 4540 // Solidity: function isMinter(address account) view returns(bool) 4541 func (_MinterRole *MinterRoleCallerSession) IsMinter(account common.Address) (bool, error) { 4542 return _MinterRole.Contract.IsMinter(&_MinterRole.CallOpts, account) 4543 } 4544 4545 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 4546 // 4547 // Solidity: function addMinter(address account) returns() 4548 func (_MinterRole *MinterRoleTransactor) AddMinter(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { 4549 return _MinterRole.contract.Transact(opts, "addMinter", account) 4550 } 4551 4552 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 4553 // 4554 // Solidity: function addMinter(address account) returns() 4555 func (_MinterRole *MinterRoleSession) AddMinter(account common.Address) (*types.Transaction, error) { 4556 return _MinterRole.Contract.AddMinter(&_MinterRole.TransactOpts, account) 4557 } 4558 4559 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 4560 // 4561 // Solidity: function addMinter(address account) returns() 4562 func (_MinterRole *MinterRoleTransactorSession) AddMinter(account common.Address) (*types.Transaction, error) { 4563 return _MinterRole.Contract.AddMinter(&_MinterRole.TransactOpts, account) 4564 } 4565 4566 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 4567 // 4568 // Solidity: function renounceMinter() returns() 4569 func (_MinterRole *MinterRoleTransactor) RenounceMinter(opts *bind.TransactOpts) (*types.Transaction, error) { 4570 return _MinterRole.contract.Transact(opts, "renounceMinter") 4571 } 4572 4573 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 4574 // 4575 // Solidity: function renounceMinter() returns() 4576 func (_MinterRole *MinterRoleSession) RenounceMinter() (*types.Transaction, error) { 4577 return _MinterRole.Contract.RenounceMinter(&_MinterRole.TransactOpts) 4578 } 4579 4580 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 4581 // 4582 // Solidity: function renounceMinter() returns() 4583 func (_MinterRole *MinterRoleTransactorSession) RenounceMinter() (*types.Transaction, error) { 4584 return _MinterRole.Contract.RenounceMinter(&_MinterRole.TransactOpts) 4585 } 4586 4587 // 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. 4588 type MinterRoleMinterAddedIterator struct { 4589 Event *MinterRoleMinterAdded // Event containing the contract specifics and raw log 4590 4591 contract *bind.BoundContract // Generic contract to use for unpacking event data 4592 event string // Event name to use for unpacking event data 4593 4594 logs chan types.Log // Log channel receiving the found contract events 4595 sub klaytn.Subscription // Subscription for errors, completion and termination 4596 done bool // Whether the subscription completed delivering logs 4597 fail error // Occurred error to stop iteration 4598 } 4599 4600 // Next advances the iterator to the subsequent event, returning whether there 4601 // are any more events found. In case of a retrieval or parsing error, false is 4602 // returned and Error() can be queried for the exact failure. 4603 func (it *MinterRoleMinterAddedIterator) Next() bool { 4604 // If the iterator failed, stop iterating 4605 if it.fail != nil { 4606 return false 4607 } 4608 // If the iterator completed, deliver directly whatever's available 4609 if it.done { 4610 select { 4611 case log := <-it.logs: 4612 it.Event = new(MinterRoleMinterAdded) 4613 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 4614 it.fail = err 4615 return false 4616 } 4617 it.Event.Raw = log 4618 return true 4619 4620 default: 4621 return false 4622 } 4623 } 4624 // Iterator still in progress, wait for either a data or an error event 4625 select { 4626 case log := <-it.logs: 4627 it.Event = new(MinterRoleMinterAdded) 4628 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 4629 it.fail = err 4630 return false 4631 } 4632 it.Event.Raw = log 4633 return true 4634 4635 case err := <-it.sub.Err(): 4636 it.done = true 4637 it.fail = err 4638 return it.Next() 4639 } 4640 } 4641 4642 // Error returns any retrieval or parsing error occurred during filtering. 4643 func (it *MinterRoleMinterAddedIterator) Error() error { 4644 return it.fail 4645 } 4646 4647 // Close terminates the iteration process, releasing any pending underlying 4648 // resources. 4649 func (it *MinterRoleMinterAddedIterator) Close() error { 4650 it.sub.Unsubscribe() 4651 return nil 4652 } 4653 4654 // MinterRoleMinterAdded represents a MinterAdded event raised by the MinterRole contract. 4655 type MinterRoleMinterAdded struct { 4656 Account common.Address 4657 Raw types.Log // Blockchain specific contextual infos 4658 } 4659 4660 // FilterMinterAdded is a free log retrieval operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 4661 // 4662 // Solidity: event MinterAdded(address indexed account) 4663 func (_MinterRole *MinterRoleFilterer) FilterMinterAdded(opts *bind.FilterOpts, account []common.Address) (*MinterRoleMinterAddedIterator, error) { 4664 4665 var accountRule []interface{} 4666 for _, accountItem := range account { 4667 accountRule = append(accountRule, accountItem) 4668 } 4669 4670 logs, sub, err := _MinterRole.contract.FilterLogs(opts, "MinterAdded", accountRule) 4671 if err != nil { 4672 return nil, err 4673 } 4674 return &MinterRoleMinterAddedIterator{contract: _MinterRole.contract, event: "MinterAdded", logs: logs, sub: sub}, nil 4675 } 4676 4677 // WatchMinterAdded is a free log subscription operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 4678 // 4679 // Solidity: event MinterAdded(address indexed account) 4680 func (_MinterRole *MinterRoleFilterer) WatchMinterAdded(opts *bind.WatchOpts, sink chan<- *MinterRoleMinterAdded, account []common.Address) (event.Subscription, error) { 4681 4682 var accountRule []interface{} 4683 for _, accountItem := range account { 4684 accountRule = append(accountRule, accountItem) 4685 } 4686 4687 logs, sub, err := _MinterRole.contract.WatchLogs(opts, "MinterAdded", accountRule) 4688 if err != nil { 4689 return nil, err 4690 } 4691 return event.NewSubscription(func(quit <-chan struct{}) error { 4692 defer sub.Unsubscribe() 4693 for { 4694 select { 4695 case log := <-logs: 4696 // New log arrived, parse the event and forward to the user 4697 event := new(MinterRoleMinterAdded) 4698 if err := _MinterRole.contract.UnpackLog(event, "MinterAdded", log); err != nil { 4699 return err 4700 } 4701 event.Raw = log 4702 4703 select { 4704 case sink <- event: 4705 case err := <-sub.Err(): 4706 return err 4707 case <-quit: 4708 return nil 4709 } 4710 case err := <-sub.Err(): 4711 return err 4712 case <-quit: 4713 return nil 4714 } 4715 } 4716 }), nil 4717 } 4718 4719 // ParseMinterAdded is a log parse operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 4720 // 4721 // Solidity: event MinterAdded(address indexed account) 4722 func (_MinterRole *MinterRoleFilterer) ParseMinterAdded(log types.Log) (*MinterRoleMinterAdded, error) { 4723 event := new(MinterRoleMinterAdded) 4724 if err := _MinterRole.contract.UnpackLog(event, "MinterAdded", log); err != nil { 4725 return nil, err 4726 } 4727 return event, nil 4728 } 4729 4730 // 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. 4731 type MinterRoleMinterRemovedIterator struct { 4732 Event *MinterRoleMinterRemoved // Event containing the contract specifics and raw log 4733 4734 contract *bind.BoundContract // Generic contract to use for unpacking event data 4735 event string // Event name to use for unpacking event data 4736 4737 logs chan types.Log // Log channel receiving the found contract events 4738 sub klaytn.Subscription // Subscription for errors, completion and termination 4739 done bool // Whether the subscription completed delivering logs 4740 fail error // Occurred error to stop iteration 4741 } 4742 4743 // Next advances the iterator to the subsequent event, returning whether there 4744 // are any more events found. In case of a retrieval or parsing error, false is 4745 // returned and Error() can be queried for the exact failure. 4746 func (it *MinterRoleMinterRemovedIterator) Next() bool { 4747 // If the iterator failed, stop iterating 4748 if it.fail != nil { 4749 return false 4750 } 4751 // If the iterator completed, deliver directly whatever's available 4752 if it.done { 4753 select { 4754 case log := <-it.logs: 4755 it.Event = new(MinterRoleMinterRemoved) 4756 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 4757 it.fail = err 4758 return false 4759 } 4760 it.Event.Raw = log 4761 return true 4762 4763 default: 4764 return false 4765 } 4766 } 4767 // Iterator still in progress, wait for either a data or an error event 4768 select { 4769 case log := <-it.logs: 4770 it.Event = new(MinterRoleMinterRemoved) 4771 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 4772 it.fail = err 4773 return false 4774 } 4775 it.Event.Raw = log 4776 return true 4777 4778 case err := <-it.sub.Err(): 4779 it.done = true 4780 it.fail = err 4781 return it.Next() 4782 } 4783 } 4784 4785 // Error returns any retrieval or parsing error occurred during filtering. 4786 func (it *MinterRoleMinterRemovedIterator) Error() error { 4787 return it.fail 4788 } 4789 4790 // Close terminates the iteration process, releasing any pending underlying 4791 // resources. 4792 func (it *MinterRoleMinterRemovedIterator) Close() error { 4793 it.sub.Unsubscribe() 4794 return nil 4795 } 4796 4797 // MinterRoleMinterRemoved represents a MinterRemoved event raised by the MinterRole contract. 4798 type MinterRoleMinterRemoved struct { 4799 Account common.Address 4800 Raw types.Log // Blockchain specific contextual infos 4801 } 4802 4803 // FilterMinterRemoved is a free log retrieval operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 4804 // 4805 // Solidity: event MinterRemoved(address indexed account) 4806 func (_MinterRole *MinterRoleFilterer) FilterMinterRemoved(opts *bind.FilterOpts, account []common.Address) (*MinterRoleMinterRemovedIterator, error) { 4807 4808 var accountRule []interface{} 4809 for _, accountItem := range account { 4810 accountRule = append(accountRule, accountItem) 4811 } 4812 4813 logs, sub, err := _MinterRole.contract.FilterLogs(opts, "MinterRemoved", accountRule) 4814 if err != nil { 4815 return nil, err 4816 } 4817 return &MinterRoleMinterRemovedIterator{contract: _MinterRole.contract, event: "MinterRemoved", logs: logs, sub: sub}, nil 4818 } 4819 4820 // WatchMinterRemoved is a free log subscription operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 4821 // 4822 // Solidity: event MinterRemoved(address indexed account) 4823 func (_MinterRole *MinterRoleFilterer) WatchMinterRemoved(opts *bind.WatchOpts, sink chan<- *MinterRoleMinterRemoved, account []common.Address) (event.Subscription, error) { 4824 4825 var accountRule []interface{} 4826 for _, accountItem := range account { 4827 accountRule = append(accountRule, accountItem) 4828 } 4829 4830 logs, sub, err := _MinterRole.contract.WatchLogs(opts, "MinterRemoved", accountRule) 4831 if err != nil { 4832 return nil, err 4833 } 4834 return event.NewSubscription(func(quit <-chan struct{}) error { 4835 defer sub.Unsubscribe() 4836 for { 4837 select { 4838 case log := <-logs: 4839 // New log arrived, parse the event and forward to the user 4840 event := new(MinterRoleMinterRemoved) 4841 if err := _MinterRole.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 4842 return err 4843 } 4844 event.Raw = log 4845 4846 select { 4847 case sink <- event: 4848 case err := <-sub.Err(): 4849 return err 4850 case <-quit: 4851 return nil 4852 } 4853 case err := <-sub.Err(): 4854 return err 4855 case <-quit: 4856 return nil 4857 } 4858 } 4859 }), nil 4860 } 4861 4862 // ParseMinterRemoved is a log parse operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 4863 // 4864 // Solidity: event MinterRemoved(address indexed account) 4865 func (_MinterRole *MinterRoleFilterer) ParseMinterRemoved(log types.Log) (*MinterRoleMinterRemoved, error) { 4866 event := new(MinterRoleMinterRemoved) 4867 if err := _MinterRole.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 4868 return nil, err 4869 } 4870 return event, nil 4871 } 4872 4873 // OwnableABI is the input ABI used to generate the binding from. 4874 const OwnableABI = "[{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" 4875 4876 // OwnableBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 4877 const OwnableBinRuntime = `` 4878 4879 // OwnableFuncSigs maps the 4-byte function signature to its string representation. 4880 var OwnableFuncSigs = map[string]string{ 4881 "8f32d59b": "isOwner()", 4882 "8da5cb5b": "owner()", 4883 "715018a6": "renounceOwnership()", 4884 "f2fde38b": "transferOwnership(address)", 4885 } 4886 4887 // Ownable is an auto generated Go binding around a Klaytn contract. 4888 type Ownable struct { 4889 OwnableCaller // Read-only binding to the contract 4890 OwnableTransactor // Write-only binding to the contract 4891 OwnableFilterer // Log filterer for contract events 4892 } 4893 4894 // OwnableCaller is an auto generated read-only Go binding around a Klaytn contract. 4895 type OwnableCaller struct { 4896 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4897 } 4898 4899 // OwnableTransactor is an auto generated write-only Go binding around a Klaytn contract. 4900 type OwnableTransactor struct { 4901 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4902 } 4903 4904 // OwnableFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 4905 type OwnableFilterer struct { 4906 contract *bind.BoundContract // Generic contract wrapper for the low level calls 4907 } 4908 4909 // OwnableSession is an auto generated Go binding around a Klaytn contract, 4910 // with pre-set call and transact options. 4911 type OwnableSession struct { 4912 Contract *Ownable // Generic contract binding to set the session for 4913 CallOpts bind.CallOpts // Call options to use throughout this session 4914 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 4915 } 4916 4917 // OwnableCallerSession is an auto generated read-only Go binding around a Klaytn contract, 4918 // with pre-set call options. 4919 type OwnableCallerSession struct { 4920 Contract *OwnableCaller // Generic contract caller binding to set the session for 4921 CallOpts bind.CallOpts // Call options to use throughout this session 4922 } 4923 4924 // OwnableTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 4925 // with pre-set transact options. 4926 type OwnableTransactorSession struct { 4927 Contract *OwnableTransactor // Generic contract transactor binding to set the session for 4928 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 4929 } 4930 4931 // OwnableRaw is an auto generated low-level Go binding around a Klaytn contract. 4932 type OwnableRaw struct { 4933 Contract *Ownable // Generic contract binding to access the raw methods on 4934 } 4935 4936 // OwnableCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 4937 type OwnableCallerRaw struct { 4938 Contract *OwnableCaller // Generic read-only contract binding to access the raw methods on 4939 } 4940 4941 // OwnableTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 4942 type OwnableTransactorRaw struct { 4943 Contract *OwnableTransactor // Generic write-only contract binding to access the raw methods on 4944 } 4945 4946 // NewOwnable creates a new instance of Ownable, bound to a specific deployed contract. 4947 func NewOwnable(address common.Address, backend bind.ContractBackend) (*Ownable, error) { 4948 contract, err := bindOwnable(address, backend, backend, backend) 4949 if err != nil { 4950 return nil, err 4951 } 4952 return &Ownable{OwnableCaller: OwnableCaller{contract: contract}, OwnableTransactor: OwnableTransactor{contract: contract}, OwnableFilterer: OwnableFilterer{contract: contract}}, nil 4953 } 4954 4955 // NewOwnableCaller creates a new read-only instance of Ownable, bound to a specific deployed contract. 4956 func NewOwnableCaller(address common.Address, caller bind.ContractCaller) (*OwnableCaller, error) { 4957 contract, err := bindOwnable(address, caller, nil, nil) 4958 if err != nil { 4959 return nil, err 4960 } 4961 return &OwnableCaller{contract: contract}, nil 4962 } 4963 4964 // NewOwnableTransactor creates a new write-only instance of Ownable, bound to a specific deployed contract. 4965 func NewOwnableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableTransactor, error) { 4966 contract, err := bindOwnable(address, nil, transactor, nil) 4967 if err != nil { 4968 return nil, err 4969 } 4970 return &OwnableTransactor{contract: contract}, nil 4971 } 4972 4973 // NewOwnableFilterer creates a new log filterer instance of Ownable, bound to a specific deployed contract. 4974 func NewOwnableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableFilterer, error) { 4975 contract, err := bindOwnable(address, nil, nil, filterer) 4976 if err != nil { 4977 return nil, err 4978 } 4979 return &OwnableFilterer{contract: contract}, nil 4980 } 4981 4982 // bindOwnable binds a generic wrapper to an already deployed contract. 4983 func bindOwnable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 4984 parsed, err := abi.JSON(strings.NewReader(OwnableABI)) 4985 if err != nil { 4986 return nil, err 4987 } 4988 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 4989 } 4990 4991 // Call invokes the (constant) contract method with params as input values and 4992 // sets the output to result. The result type might be a single field for simple 4993 // returns, a slice of interfaces for anonymous returns and a struct for named 4994 // returns. 4995 func (_Ownable *OwnableRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 4996 return _Ownable.Contract.OwnableCaller.contract.Call(opts, result, method, params...) 4997 } 4998 4999 // Transfer initiates a plain transaction to move funds to the contract, calling 5000 // its default method if one is available. 5001 func (_Ownable *OwnableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5002 return _Ownable.Contract.OwnableTransactor.contract.Transfer(opts) 5003 } 5004 5005 // Transact invokes the (paid) contract method with params as input values. 5006 func (_Ownable *OwnableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5007 return _Ownable.Contract.OwnableTransactor.contract.Transact(opts, method, params...) 5008 } 5009 5010 // Call invokes the (constant) contract method with params as input values and 5011 // sets the output to result. The result type might be a single field for simple 5012 // returns, a slice of interfaces for anonymous returns and a struct for named 5013 // returns. 5014 func (_Ownable *OwnableCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5015 return _Ownable.Contract.contract.Call(opts, result, method, params...) 5016 } 5017 5018 // Transfer initiates a plain transaction to move funds to the contract, calling 5019 // its default method if one is available. 5020 func (_Ownable *OwnableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5021 return _Ownable.Contract.contract.Transfer(opts) 5022 } 5023 5024 // Transact invokes the (paid) contract method with params as input values. 5025 func (_Ownable *OwnableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5026 return _Ownable.Contract.contract.Transact(opts, method, params...) 5027 } 5028 5029 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 5030 // 5031 // Solidity: function isOwner() view returns(bool) 5032 func (_Ownable *OwnableCaller) IsOwner(opts *bind.CallOpts) (bool, error) { 5033 var ( 5034 ret0 = new(bool) 5035 ) 5036 out := ret0 5037 err := _Ownable.contract.Call(opts, out, "isOwner") 5038 return *ret0, err 5039 } 5040 5041 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 5042 // 5043 // Solidity: function isOwner() view returns(bool) 5044 func (_Ownable *OwnableSession) IsOwner() (bool, error) { 5045 return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) 5046 } 5047 5048 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 5049 // 5050 // Solidity: function isOwner() view returns(bool) 5051 func (_Ownable *OwnableCallerSession) IsOwner() (bool, error) { 5052 return _Ownable.Contract.IsOwner(&_Ownable.CallOpts) 5053 } 5054 5055 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 5056 // 5057 // Solidity: function owner() view returns(address) 5058 func (_Ownable *OwnableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { 5059 var ( 5060 ret0 = new(common.Address) 5061 ) 5062 out := ret0 5063 err := _Ownable.contract.Call(opts, out, "owner") 5064 return *ret0, err 5065 } 5066 5067 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 5068 // 5069 // Solidity: function owner() view returns(address) 5070 func (_Ownable *OwnableSession) Owner() (common.Address, error) { 5071 return _Ownable.Contract.Owner(&_Ownable.CallOpts) 5072 } 5073 5074 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 5075 // 5076 // Solidity: function owner() view returns(address) 5077 func (_Ownable *OwnableCallerSession) Owner() (common.Address, error) { 5078 return _Ownable.Contract.Owner(&_Ownable.CallOpts) 5079 } 5080 5081 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 5082 // 5083 // Solidity: function renounceOwnership() returns() 5084 func (_Ownable *OwnableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { 5085 return _Ownable.contract.Transact(opts, "renounceOwnership") 5086 } 5087 5088 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 5089 // 5090 // Solidity: function renounceOwnership() returns() 5091 func (_Ownable *OwnableSession) RenounceOwnership() (*types.Transaction, error) { 5092 return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) 5093 } 5094 5095 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 5096 // 5097 // Solidity: function renounceOwnership() returns() 5098 func (_Ownable *OwnableTransactorSession) RenounceOwnership() (*types.Transaction, error) { 5099 return _Ownable.Contract.RenounceOwnership(&_Ownable.TransactOpts) 5100 } 5101 5102 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 5103 // 5104 // Solidity: function transferOwnership(address newOwner) returns() 5105 func (_Ownable *OwnableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { 5106 return _Ownable.contract.Transact(opts, "transferOwnership", newOwner) 5107 } 5108 5109 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 5110 // 5111 // Solidity: function transferOwnership(address newOwner) returns() 5112 func (_Ownable *OwnableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 5113 return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) 5114 } 5115 5116 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 5117 // 5118 // Solidity: function transferOwnership(address newOwner) returns() 5119 func (_Ownable *OwnableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 5120 return _Ownable.Contract.TransferOwnership(&_Ownable.TransactOpts, newOwner) 5121 } 5122 5123 // OwnableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Ownable contract. 5124 type OwnableOwnershipTransferredIterator struct { 5125 Event *OwnableOwnershipTransferred // Event containing the contract specifics and raw log 5126 5127 contract *bind.BoundContract // Generic contract to use for unpacking event data 5128 event string // Event name to use for unpacking event data 5129 5130 logs chan types.Log // Log channel receiving the found contract events 5131 sub klaytn.Subscription // Subscription for errors, completion and termination 5132 done bool // Whether the subscription completed delivering logs 5133 fail error // Occurred error to stop iteration 5134 } 5135 5136 // Next advances the iterator to the subsequent event, returning whether there 5137 // are any more events found. In case of a retrieval or parsing error, false is 5138 // returned and Error() can be queried for the exact failure. 5139 func (it *OwnableOwnershipTransferredIterator) Next() bool { 5140 // If the iterator failed, stop iterating 5141 if it.fail != nil { 5142 return false 5143 } 5144 // If the iterator completed, deliver directly whatever's available 5145 if it.done { 5146 select { 5147 case log := <-it.logs: 5148 it.Event = new(OwnableOwnershipTransferred) 5149 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 5150 it.fail = err 5151 return false 5152 } 5153 it.Event.Raw = log 5154 return true 5155 5156 default: 5157 return false 5158 } 5159 } 5160 // Iterator still in progress, wait for either a data or an error event 5161 select { 5162 case log := <-it.logs: 5163 it.Event = new(OwnableOwnershipTransferred) 5164 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 5165 it.fail = err 5166 return false 5167 } 5168 it.Event.Raw = log 5169 return true 5170 5171 case err := <-it.sub.Err(): 5172 it.done = true 5173 it.fail = err 5174 return it.Next() 5175 } 5176 } 5177 5178 // Error returns any retrieval or parsing error occurred during filtering. 5179 func (it *OwnableOwnershipTransferredIterator) Error() error { 5180 return it.fail 5181 } 5182 5183 // Close terminates the iteration process, releasing any pending underlying 5184 // resources. 5185 func (it *OwnableOwnershipTransferredIterator) Close() error { 5186 it.sub.Unsubscribe() 5187 return nil 5188 } 5189 5190 // OwnableOwnershipTransferred represents a OwnershipTransferred event raised by the Ownable contract. 5191 type OwnableOwnershipTransferred struct { 5192 PreviousOwner common.Address 5193 NewOwner common.Address 5194 Raw types.Log // Blockchain specific contextual infos 5195 } 5196 5197 // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 5198 // 5199 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 5200 func (_Ownable *OwnableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableOwnershipTransferredIterator, error) { 5201 5202 var previousOwnerRule []interface{} 5203 for _, previousOwnerItem := range previousOwner { 5204 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 5205 } 5206 var newOwnerRule []interface{} 5207 for _, newOwnerItem := range newOwner { 5208 newOwnerRule = append(newOwnerRule, newOwnerItem) 5209 } 5210 5211 logs, sub, err := _Ownable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 5212 if err != nil { 5213 return nil, err 5214 } 5215 return &OwnableOwnershipTransferredIterator{contract: _Ownable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil 5216 } 5217 5218 // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 5219 // 5220 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 5221 func (_Ownable *OwnableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { 5222 5223 var previousOwnerRule []interface{} 5224 for _, previousOwnerItem := range previousOwner { 5225 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 5226 } 5227 var newOwnerRule []interface{} 5228 for _, newOwnerItem := range newOwner { 5229 newOwnerRule = append(newOwnerRule, newOwnerItem) 5230 } 5231 5232 logs, sub, err := _Ownable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 5233 if err != nil { 5234 return nil, err 5235 } 5236 return event.NewSubscription(func(quit <-chan struct{}) error { 5237 defer sub.Unsubscribe() 5238 for { 5239 select { 5240 case log := <-logs: 5241 // New log arrived, parse the event and forward to the user 5242 event := new(OwnableOwnershipTransferred) 5243 if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 5244 return err 5245 } 5246 event.Raw = log 5247 5248 select { 5249 case sink <- event: 5250 case err := <-sub.Err(): 5251 return err 5252 case <-quit: 5253 return nil 5254 } 5255 case err := <-sub.Err(): 5256 return err 5257 case <-quit: 5258 return nil 5259 } 5260 } 5261 }), nil 5262 } 5263 5264 // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 5265 // 5266 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 5267 func (_Ownable *OwnableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableOwnershipTransferred, error) { 5268 event := new(OwnableOwnershipTransferred) 5269 if err := _Ownable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 5270 return nil, err 5271 } 5272 return event, nil 5273 } 5274 5275 // RolesABI is the input ABI used to generate the binding from. 5276 const RolesABI = "[]" 5277 5278 // RolesBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 5279 const RolesBinRuntime = `73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582026429ed555f83236ac076363d644804ff5b0baa4e098f1d4ef783a49049f7df70029` 5280 5281 // RolesBin is the compiled bytecode used for deploying new contracts. 5282 var RolesBin = "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a7230582026429ed555f83236ac076363d644804ff5b0baa4e098f1d4ef783a49049f7df70029" 5283 5284 // DeployRoles deploys a new Klaytn contract, binding an instance of Roles to it. 5285 func DeployRoles(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Roles, error) { 5286 parsed, err := abi.JSON(strings.NewReader(RolesABI)) 5287 if err != nil { 5288 return common.Address{}, nil, nil, err 5289 } 5290 5291 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(RolesBin), backend) 5292 if err != nil { 5293 return common.Address{}, nil, nil, err 5294 } 5295 return address, tx, &Roles{RolesCaller: RolesCaller{contract: contract}, RolesTransactor: RolesTransactor{contract: contract}, RolesFilterer: RolesFilterer{contract: contract}}, nil 5296 } 5297 5298 // Roles is an auto generated Go binding around a Klaytn contract. 5299 type Roles struct { 5300 RolesCaller // Read-only binding to the contract 5301 RolesTransactor // Write-only binding to the contract 5302 RolesFilterer // Log filterer for contract events 5303 } 5304 5305 // RolesCaller is an auto generated read-only Go binding around a Klaytn contract. 5306 type RolesCaller struct { 5307 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5308 } 5309 5310 // RolesTransactor is an auto generated write-only Go binding around a Klaytn contract. 5311 type RolesTransactor struct { 5312 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5313 } 5314 5315 // RolesFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 5316 type RolesFilterer struct { 5317 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5318 } 5319 5320 // RolesSession is an auto generated Go binding around a Klaytn contract, 5321 // with pre-set call and transact options. 5322 type RolesSession struct { 5323 Contract *Roles // Generic contract binding to set the session for 5324 CallOpts bind.CallOpts // Call options to use throughout this session 5325 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 5326 } 5327 5328 // RolesCallerSession is an auto generated read-only Go binding around a Klaytn contract, 5329 // with pre-set call options. 5330 type RolesCallerSession struct { 5331 Contract *RolesCaller // Generic contract caller binding to set the session for 5332 CallOpts bind.CallOpts // Call options to use throughout this session 5333 } 5334 5335 // RolesTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 5336 // with pre-set transact options. 5337 type RolesTransactorSession struct { 5338 Contract *RolesTransactor // Generic contract transactor binding to set the session for 5339 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 5340 } 5341 5342 // RolesRaw is an auto generated low-level Go binding around a Klaytn contract. 5343 type RolesRaw struct { 5344 Contract *Roles // Generic contract binding to access the raw methods on 5345 } 5346 5347 // RolesCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 5348 type RolesCallerRaw struct { 5349 Contract *RolesCaller // Generic read-only contract binding to access the raw methods on 5350 } 5351 5352 // RolesTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 5353 type RolesTransactorRaw struct { 5354 Contract *RolesTransactor // Generic write-only contract binding to access the raw methods on 5355 } 5356 5357 // NewRoles creates a new instance of Roles, bound to a specific deployed contract. 5358 func NewRoles(address common.Address, backend bind.ContractBackend) (*Roles, error) { 5359 contract, err := bindRoles(address, backend, backend, backend) 5360 if err != nil { 5361 return nil, err 5362 } 5363 return &Roles{RolesCaller: RolesCaller{contract: contract}, RolesTransactor: RolesTransactor{contract: contract}, RolesFilterer: RolesFilterer{contract: contract}}, nil 5364 } 5365 5366 // NewRolesCaller creates a new read-only instance of Roles, bound to a specific deployed contract. 5367 func NewRolesCaller(address common.Address, caller bind.ContractCaller) (*RolesCaller, error) { 5368 contract, err := bindRoles(address, caller, nil, nil) 5369 if err != nil { 5370 return nil, err 5371 } 5372 return &RolesCaller{contract: contract}, nil 5373 } 5374 5375 // NewRolesTransactor creates a new write-only instance of Roles, bound to a specific deployed contract. 5376 func NewRolesTransactor(address common.Address, transactor bind.ContractTransactor) (*RolesTransactor, error) { 5377 contract, err := bindRoles(address, nil, transactor, nil) 5378 if err != nil { 5379 return nil, err 5380 } 5381 return &RolesTransactor{contract: contract}, nil 5382 } 5383 5384 // NewRolesFilterer creates a new log filterer instance of Roles, bound to a specific deployed contract. 5385 func NewRolesFilterer(address common.Address, filterer bind.ContractFilterer) (*RolesFilterer, error) { 5386 contract, err := bindRoles(address, nil, nil, filterer) 5387 if err != nil { 5388 return nil, err 5389 } 5390 return &RolesFilterer{contract: contract}, nil 5391 } 5392 5393 // bindRoles binds a generic wrapper to an already deployed contract. 5394 func bindRoles(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 5395 parsed, err := abi.JSON(strings.NewReader(RolesABI)) 5396 if err != nil { 5397 return nil, err 5398 } 5399 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 5400 } 5401 5402 // Call invokes the (constant) contract method with params as input values and 5403 // sets the output to result. The result type might be a single field for simple 5404 // returns, a slice of interfaces for anonymous returns and a struct for named 5405 // returns. 5406 func (_Roles *RolesRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5407 return _Roles.Contract.RolesCaller.contract.Call(opts, result, method, params...) 5408 } 5409 5410 // Transfer initiates a plain transaction to move funds to the contract, calling 5411 // its default method if one is available. 5412 func (_Roles *RolesRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5413 return _Roles.Contract.RolesTransactor.contract.Transfer(opts) 5414 } 5415 5416 // Transact invokes the (paid) contract method with params as input values. 5417 func (_Roles *RolesRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5418 return _Roles.Contract.RolesTransactor.contract.Transact(opts, method, params...) 5419 } 5420 5421 // Call invokes the (constant) contract method with params as input values and 5422 // sets the output to result. The result type might be a single field for simple 5423 // returns, a slice of interfaces for anonymous returns and a struct for named 5424 // returns. 5425 func (_Roles *RolesCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5426 return _Roles.Contract.contract.Call(opts, result, method, params...) 5427 } 5428 5429 // Transfer initiates a plain transaction to move funds to the contract, calling 5430 // its default method if one is available. 5431 func (_Roles *RolesTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5432 return _Roles.Contract.contract.Transfer(opts) 5433 } 5434 5435 // Transact invokes the (paid) contract method with params as input values. 5436 func (_Roles *RolesTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5437 return _Roles.Contract.contract.Transact(opts, method, params...) 5438 } 5439 5440 // SafeMathABI is the input ABI used to generate the binding from. 5441 const SafeMathABI = "[]" 5442 5443 // SafeMathBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 5444 const SafeMathBinRuntime = `73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058201aa360e6241ae1bc829140fb38ae5ca1672181b2a5c529c4ca3a045ed2896feb0029` 5445 5446 // SafeMathBin is the compiled bytecode used for deploying new contracts. 5447 var SafeMathBin = "0x604c6023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea165627a7a723058201aa360e6241ae1bc829140fb38ae5ca1672181b2a5c529c4ca3a045ed2896feb0029" 5448 5449 // DeploySafeMath deploys a new Klaytn contract, binding an instance of SafeMath to it. 5450 func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { 5451 parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) 5452 if err != nil { 5453 return common.Address{}, nil, nil, err 5454 } 5455 5456 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) 5457 if err != nil { 5458 return common.Address{}, nil, nil, err 5459 } 5460 return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil 5461 } 5462 5463 // SafeMath is an auto generated Go binding around a Klaytn contract. 5464 type SafeMath struct { 5465 SafeMathCaller // Read-only binding to the contract 5466 SafeMathTransactor // Write-only binding to the contract 5467 SafeMathFilterer // Log filterer for contract events 5468 } 5469 5470 // SafeMathCaller is an auto generated read-only Go binding around a Klaytn contract. 5471 type SafeMathCaller struct { 5472 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5473 } 5474 5475 // SafeMathTransactor is an auto generated write-only Go binding around a Klaytn contract. 5476 type SafeMathTransactor struct { 5477 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5478 } 5479 5480 // SafeMathFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 5481 type SafeMathFilterer struct { 5482 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5483 } 5484 5485 // SafeMathSession is an auto generated Go binding around a Klaytn contract, 5486 // with pre-set call and transact options. 5487 type SafeMathSession struct { 5488 Contract *SafeMath // Generic contract binding to set the session for 5489 CallOpts bind.CallOpts // Call options to use throughout this session 5490 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 5491 } 5492 5493 // SafeMathCallerSession is an auto generated read-only Go binding around a Klaytn contract, 5494 // with pre-set call options. 5495 type SafeMathCallerSession struct { 5496 Contract *SafeMathCaller // Generic contract caller binding to set the session for 5497 CallOpts bind.CallOpts // Call options to use throughout this session 5498 } 5499 5500 // SafeMathTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 5501 // with pre-set transact options. 5502 type SafeMathTransactorSession struct { 5503 Contract *SafeMathTransactor // Generic contract transactor binding to set the session for 5504 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 5505 } 5506 5507 // SafeMathRaw is an auto generated low-level Go binding around a Klaytn contract. 5508 type SafeMathRaw struct { 5509 Contract *SafeMath // Generic contract binding to access the raw methods on 5510 } 5511 5512 // SafeMathCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 5513 type SafeMathCallerRaw struct { 5514 Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on 5515 } 5516 5517 // SafeMathTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 5518 type SafeMathTransactorRaw struct { 5519 Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on 5520 } 5521 5522 // NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. 5523 func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { 5524 contract, err := bindSafeMath(address, backend, backend, backend) 5525 if err != nil { 5526 return nil, err 5527 } 5528 return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil 5529 } 5530 5531 // NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. 5532 func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { 5533 contract, err := bindSafeMath(address, caller, nil, nil) 5534 if err != nil { 5535 return nil, err 5536 } 5537 return &SafeMathCaller{contract: contract}, nil 5538 } 5539 5540 // NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. 5541 func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { 5542 contract, err := bindSafeMath(address, nil, transactor, nil) 5543 if err != nil { 5544 return nil, err 5545 } 5546 return &SafeMathTransactor{contract: contract}, nil 5547 } 5548 5549 // NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. 5550 func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { 5551 contract, err := bindSafeMath(address, nil, nil, filterer) 5552 if err != nil { 5553 return nil, err 5554 } 5555 return &SafeMathFilterer{contract: contract}, nil 5556 } 5557 5558 // bindSafeMath binds a generic wrapper to an already deployed contract. 5559 func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 5560 parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) 5561 if err != nil { 5562 return nil, err 5563 } 5564 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 5565 } 5566 5567 // Call invokes the (constant) contract method with params as input values and 5568 // sets the output to result. The result type might be a single field for simple 5569 // returns, a slice of interfaces for anonymous returns and a struct for named 5570 // returns. 5571 func (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5572 return _SafeMath.Contract.SafeMathCaller.contract.Call(opts, result, method, params...) 5573 } 5574 5575 // Transfer initiates a plain transaction to move funds to the contract, calling 5576 // its default method if one is available. 5577 func (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5578 return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) 5579 } 5580 5581 // Transact invokes the (paid) contract method with params as input values. 5582 func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5583 return _SafeMath.Contract.SafeMathTransactor.contract.Transact(opts, method, params...) 5584 } 5585 5586 // Call invokes the (constant) contract method with params as input values and 5587 // sets the output to result. The result type might be a single field for simple 5588 // returns, a slice of interfaces for anonymous returns and a struct for named 5589 // returns. 5590 func (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5591 return _SafeMath.Contract.contract.Call(opts, result, method, params...) 5592 } 5593 5594 // Transfer initiates a plain transaction to move funds to the contract, calling 5595 // its default method if one is available. 5596 func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5597 return _SafeMath.Contract.contract.Transfer(opts) 5598 } 5599 5600 // Transact invokes the (paid) contract method with params as input values. 5601 func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5602 return _SafeMath.Contract.contract.Transact(opts, method, params...) 5603 } 5604 5605 // ServiceChainTokenABI is the input ABI used to generate the binding from. 5606 const ServiceChainTokenABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DECIMALS\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"INITIAL_SUPPLY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_feeLimit\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"requestValueTransfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_bridge\",\"type\":\"address\"}],\"name\":\"setBridge\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceMinter\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"NAME\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"spender\",\"type\":\"address\"},{\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"SYMBOL\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_bridge\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"account\",\"type\":\"address\"}],\"name\":\"MinterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" 5607 5608 // ServiceChainTokenBinRuntime is the compiled bytecode used for adding genesis block without deploying code. 5609 const ServiceChainTokenBinRuntime = `608060405234801561001057600080fd5b50600436106101735760003560e01c80638da5cb5b116100de578063a457c2d711610097578063dd62ed3e11610071578063dd62ed3e14610506578063e78cea9214610534578063f2fde38b1461053c578063f76f8d781461056257610173565b8063a457c2d714610488578063a9059cbb146104b4578063aa271e1a146104e057610173565b80638da5cb5b1461038b5780638dd14802146103af5780638f32d59b146103d5578063983b2d56146103dd5780639865027514610403578063a3f4df7e1461040b57610173565b80633dc3c9e1116101305780633dc3c9e11461025a57806340c10f19146102e857806342966c681461031457806370a0823114610331578063715018a61461035757806379cc67901461035f57610173565b8063095ea7b31461017857806318160ddd146101b857806323b872dd146101d25780632e0f2625146102085780632ff2e9dc14610226578063395093511461022e575b600080fd5b6101a46004803603604081101561018e57600080fd5b506001600160a01b03813516906020013561056a565b604080519115158252519081900360200190f35b6101c0610580565b60408051918252519081900360200190f35b6101a4600480360360608110156101e857600080fd5b506001600160a01b03813581169160208101359091169060400135610586565b6102106105dd565b6040805160ff9092168252519081900360200190f35b6101c06105e2565b6101a46004803603604081101561024457600080fd5b506001600160a01b0381351690602001356105f2565b6102e66004803603608081101561027057600080fd5b8135916001600160a01b0360208201351691604082013591908101906080810160608201356401000000008111156102a757600080fd5b8201836020820111156102b957600080fd5b803590602001918460018302840111640100000000831117156102db57600080fd5b50909250905061062e565b005b6101a4600480360360408110156102fe57600080fd5b506001600160a01b038135169060200135610751565b6102e66004803603602081101561032a57600080fd5b50356107a4565b6101c06004803603602081101561034757600080fd5b50356001600160a01b03166107b1565b6102e66107cc565b6102e66004803603604081101561037557600080fd5b506001600160a01b038135169060200135610872565b610393610880565b604080516001600160a01b039092168252519081900360200190f35b6102e6600480360360208110156103c557600080fd5b50356001600160a01b031661088f565b6101a4610973565b6102e6600480360360208110156103f357600080fd5b50356001600160a01b0316610984565b6102e66109d4565b6104136109df565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044d578181015183820152602001610435565b50505050905090810190601f16801561047a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a46004803603604081101561049e57600080fd5b506001600160a01b038135169060200135610a18565b6101a4600480360360408110156104ca57600080fd5b506001600160a01b038135169060200135610a54565b6101a4600480360360208110156104f657600080fd5b50356001600160a01b0316610a61565b6101c06004803603604081101561051c57600080fd5b506001600160a01b0381358116916020013516610a7a565b610393610aa5565b6102e66004803603602081101561055257600080fd5b50356001600160a01b0316610ab4565b610413610b19565b6000610577338484610b3b565b50600192915050565b60025490565b6000610593848484610c2d565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546105d39186916105ce908663ffffffff610d7516565b610b3b565b5060019392505050565b601281565b6b033b2e3c9fd0803ce800000081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105779185906105ce908663ffffffff610dd516565b600554610653906001600160a01b031661064e878663ffffffff610dd516565b610a54565b61069157604051600160e51b62461bcd0281526004018080602001828103825260258152602001806114286025913960400191505060405180910390fd5b600554604051600160e01b63f1656e5302815233600482018181526001600160a01b038881166024850152604484018a90526064840188905260a06084850190815260a4850187905294169363f1656e539389928b928a928a928a92909160c401848480828437600081840152601f19601f820116905080830192505050975050505050505050600060405180830381600087803b15801561073257600080fd5b505af1158015610746573d6000803e3d6000fd5b505050505050505050565b600061075c33610a61565b61079a57604051600160e51b62461bcd02815260040180806020018281038252603081526020018061134b6030913960400191505060405180910390fd5b6105778383610e39565b6107ae3382610f2c565b50565b6001600160a01b031660009081526020819052604090205490565b6107d4610973565b6108285760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6004546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600480546001600160a01b0319169055565b61087c8282611008565b5050565b6004546001600160a01b031690565b610897610973565b6108eb5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6108fd816001600160a01b031661104d565b6109515760408051600160e51b62461bcd02815260206004820152601860248201527f627269646765206973206e6f74206120636f6e74726163740000000000000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b0316331490565b61098d33610a61565b6109cb57604051600160e51b62461bcd02815260040180806020018281038252603081526020018061134b6030913960400191505060405180910390fd5b6107ae81611053565b6109dd3361109b565b565b6040518060400160405280601181526020017f53657276696365436861696e546f6b656e00000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105779185906105ce908663ffffffff610d7516565b6000610577338484610c2d565b6000610a7460038363ffffffff6110e316565b92915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6005546001600160a01b031681565b610abc610973565b610b105760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6107ae8161114d565b604051806040016040528060038152602001600160ea1b6214d0d50281525081565b6001600160a01b038316610b8357604051600160e51b62461bcd0281526004018080602001828103825260248152602001806114046024913960400191505060405180910390fd5b6001600160a01b038216610bcb57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806113296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610c7557604051600160e51b62461bcd0281526004018080602001828103825260258152602001806113df6025913960400191505060405180910390fd5b6001600160a01b038216610cbd57604051600160e51b62461bcd0281526004018080602001828103825260238152602001806112e06023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610ce6908263ffffffff610d7516565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d1b908263ffffffff610dd516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610dcf5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610e325760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610e975760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610eaa908263ffffffff610dd516565b6002556001600160a01b038216600090815260208190526040902054610ed6908263ffffffff610dd516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610f7457604051600160e51b62461bcd0281526004018080602001828103825260218152602001806113be6021913960400191505060405180910390fd5b600254610f87908263ffffffff610d7516565b6002556001600160a01b038216600090815260208190526040902054610fb3908263ffffffff610d7516565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b6110128282610f2c565b6001600160a01b03821660009081526001602090815260408083203380855292529091205461087c9184916105ce908563ffffffff610d7516565b3b151590565b61106460038263ffffffff6111f116565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6110ac60038263ffffffff61127516565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b03821661112d57604051600160e51b62461bcd02815260040180806020018281038252602281526020018061139c6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b6001600160a01b03811661119557604051600160e51b62461bcd0281526004018080602001828103825260268152602001806113036026913960400191505060405180910390fd5b6004546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600480546001600160a01b0319166001600160a01b0392909216919091179055565b6111fb82826110e3565b156112505760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b61127f82826110e3565b6112bd57604051600160e51b62461bcd02815260040180806020018281038252602181526020018061137b6021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573737265717565737456616c75655472616e736665723a207472616e73666572206661696c6564a165627a7a72305820b3517cc790738552a1d3bd452fa586f1db04bfff07e57508df3fbd876f93717e0029` 5610 5611 // ServiceChainTokenFuncSigs maps the 4-byte function signature to its string representation. 5612 var ServiceChainTokenFuncSigs = map[string]string{ 5613 "2e0f2625": "DECIMALS()", 5614 "2ff2e9dc": "INITIAL_SUPPLY()", 5615 "a3f4df7e": "NAME()", 5616 "f76f8d78": "SYMBOL()", 5617 "983b2d56": "addMinter(address)", 5618 "dd62ed3e": "allowance(address,address)", 5619 "095ea7b3": "approve(address,uint256)", 5620 "70a08231": "balanceOf(address)", 5621 "e78cea92": "bridge()", 5622 "42966c68": "burn(uint256)", 5623 "79cc6790": "burnFrom(address,uint256)", 5624 "a457c2d7": "decreaseAllowance(address,uint256)", 5625 "39509351": "increaseAllowance(address,uint256)", 5626 "aa271e1a": "isMinter(address)", 5627 "8f32d59b": "isOwner()", 5628 "40c10f19": "mint(address,uint256)", 5629 "8da5cb5b": "owner()", 5630 "98650275": "renounceMinter()", 5631 "715018a6": "renounceOwnership()", 5632 "3dc3c9e1": "requestValueTransfer(uint256,address,uint256,bytes)", 5633 "8dd14802": "setBridge(address)", 5634 "18160ddd": "totalSupply()", 5635 "a9059cbb": "transfer(address,uint256)", 5636 "23b872dd": "transferFrom(address,address,uint256)", 5637 "f2fde38b": "transferOwnership(address)", 5638 } 5639 5640 // ServiceChainTokenBin is the compiled bytecode used for deploying new contracts. 5641 var ServiceChainTokenBin = "0x60806040523480156200001157600080fd5b50604051602080620019c6833981018060405260208110156200003357600080fd5b5051806200004833620000cc602090811b901c565b600480546001600160a01b0319163317908190556040516001600160a01b0391909116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3620000a5816200011e60201b60201c565b50620000c5336b033b2e3c9fd0803ce800000062000247602090811b901c565b506200051c565b620000e78160036200036260201b620011f11790919060201c565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6200012e6200040660201b60201c565b6200019a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b620001b9816001600160a01b03166200041760201b6200104d1760201c565b6200022557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f627269646765206973206e6f74206120636f6e74726163740000000000000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038216620002bd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002d9816002546200041d60201b62000dd51790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200030c91839062000dd56200041d821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6200037482826200049960201b60201c565b15620003e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b6004546001600160a01b0316331490565b3b151590565b6000828201838110156200049257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006001600160a01b038216620004fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180620019a46022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b611478806200052c6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80638da5cb5b116100de578063a457c2d711610097578063dd62ed3e11610071578063dd62ed3e14610506578063e78cea9214610534578063f2fde38b1461053c578063f76f8d781461056257610173565b8063a457c2d714610488578063a9059cbb146104b4578063aa271e1a146104e057610173565b80638da5cb5b1461038b5780638dd14802146103af5780638f32d59b146103d5578063983b2d56146103dd5780639865027514610403578063a3f4df7e1461040b57610173565b80633dc3c9e1116101305780633dc3c9e11461025a57806340c10f19146102e857806342966c681461031457806370a0823114610331578063715018a61461035757806379cc67901461035f57610173565b8063095ea7b31461017857806318160ddd146101b857806323b872dd146101d25780632e0f2625146102085780632ff2e9dc14610226578063395093511461022e575b600080fd5b6101a46004803603604081101561018e57600080fd5b506001600160a01b03813516906020013561056a565b604080519115158252519081900360200190f35b6101c0610580565b60408051918252519081900360200190f35b6101a4600480360360608110156101e857600080fd5b506001600160a01b03813581169160208101359091169060400135610586565b6102106105dd565b6040805160ff9092168252519081900360200190f35b6101c06105e2565b6101a46004803603604081101561024457600080fd5b506001600160a01b0381351690602001356105f2565b6102e66004803603608081101561027057600080fd5b8135916001600160a01b0360208201351691604082013591908101906080810160608201356401000000008111156102a757600080fd5b8201836020820111156102b957600080fd5b803590602001918460018302840111640100000000831117156102db57600080fd5b50909250905061062e565b005b6101a4600480360360408110156102fe57600080fd5b506001600160a01b038135169060200135610751565b6102e66004803603602081101561032a57600080fd5b50356107a4565b6101c06004803603602081101561034757600080fd5b50356001600160a01b03166107b1565b6102e66107cc565b6102e66004803603604081101561037557600080fd5b506001600160a01b038135169060200135610872565b610393610880565b604080516001600160a01b039092168252519081900360200190f35b6102e6600480360360208110156103c557600080fd5b50356001600160a01b031661088f565b6101a4610973565b6102e6600480360360208110156103f357600080fd5b50356001600160a01b0316610984565b6102e66109d4565b6104136109df565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044d578181015183820152602001610435565b50505050905090810190601f16801561047a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a46004803603604081101561049e57600080fd5b506001600160a01b038135169060200135610a18565b6101a4600480360360408110156104ca57600080fd5b506001600160a01b038135169060200135610a54565b6101a4600480360360208110156104f657600080fd5b50356001600160a01b0316610a61565b6101c06004803603604081101561051c57600080fd5b506001600160a01b0381358116916020013516610a7a565b610393610aa5565b6102e66004803603602081101561055257600080fd5b50356001600160a01b0316610ab4565b610413610b19565b6000610577338484610b3b565b50600192915050565b60025490565b6000610593848484610c2d565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546105d39186916105ce908663ffffffff610d7516565b610b3b565b5060019392505050565b601281565b6b033b2e3c9fd0803ce800000081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105779185906105ce908663ffffffff610dd516565b600554610653906001600160a01b031661064e878663ffffffff610dd516565b610a54565b61069157604051600160e51b62461bcd0281526004018080602001828103825260258152602001806114286025913960400191505060405180910390fd5b600554604051600160e01b63f1656e5302815233600482018181526001600160a01b038881166024850152604484018a90526064840188905260a06084850190815260a4850187905294169363f1656e539389928b928a928a928a92909160c401848480828437600081840152601f19601f820116905080830192505050975050505050505050600060405180830381600087803b15801561073257600080fd5b505af1158015610746573d6000803e3d6000fd5b505050505050505050565b600061075c33610a61565b61079a57604051600160e51b62461bcd02815260040180806020018281038252603081526020018061134b6030913960400191505060405180910390fd5b6105778383610e39565b6107ae3382610f2c565b50565b6001600160a01b031660009081526020819052604090205490565b6107d4610973565b6108285760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6004546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600480546001600160a01b0319169055565b61087c8282611008565b5050565b6004546001600160a01b031690565b610897610973565b6108eb5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6108fd816001600160a01b031661104d565b6109515760408051600160e51b62461bcd02815260206004820152601860248201527f627269646765206973206e6f74206120636f6e74726163740000000000000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b0316331490565b61098d33610a61565b6109cb57604051600160e51b62461bcd02815260040180806020018281038252603081526020018061134b6030913960400191505060405180910390fd5b6107ae81611053565b6109dd3361109b565b565b6040518060400160405280601181526020017f53657276696365436861696e546f6b656e00000000000000000000000000000081525081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105779185906105ce908663ffffffff610d7516565b6000610577338484610c2d565b6000610a7460038363ffffffff6110e316565b92915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6005546001600160a01b031681565b610abc610973565b610b105760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6107ae8161114d565b604051806040016040528060038152602001600160ea1b6214d0d50281525081565b6001600160a01b038316610b8357604051600160e51b62461bcd0281526004018080602001828103825260248152602001806114046024913960400191505060405180910390fd5b6001600160a01b038216610bcb57604051600160e51b62461bcd0281526004018080602001828103825260228152602001806113296022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610c7557604051600160e51b62461bcd0281526004018080602001828103825260258152602001806113df6025913960400191505060405180910390fd5b6001600160a01b038216610cbd57604051600160e51b62461bcd0281526004018080602001828103825260238152602001806112e06023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610ce6908263ffffffff610d7516565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d1b908263ffffffff610dd516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610dcf5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610e325760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610e975760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610eaa908263ffffffff610dd516565b6002556001600160a01b038216600090815260208190526040902054610ed6908263ffffffff610dd516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610f7457604051600160e51b62461bcd0281526004018080602001828103825260218152602001806113be6021913960400191505060405180910390fd5b600254610f87908263ffffffff610d7516565b6002556001600160a01b038216600090815260208190526040902054610fb3908263ffffffff610d7516565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b6110128282610f2c565b6001600160a01b03821660009081526001602090815260408083203380855292529091205461087c9184916105ce908563ffffffff610d7516565b3b151590565b61106460038263ffffffff6111f116565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6110ac60038263ffffffff61127516565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b03821661112d57604051600160e51b62461bcd02815260040180806020018281038252602281526020018061139c6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b6001600160a01b03811661119557604051600160e51b62461bcd0281526004018080602001828103825260268152602001806113036026913960400191505060405180910390fd5b6004546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600480546001600160a01b0319166001600160a01b0392909216919091179055565b6111fb82826110e3565b156112505760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b61127f82826110e3565b6112bd57604051600160e51b62461bcd02815260040180806020018281038252602181526020018061137b6021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573737265717565737456616c75655472616e736665723a207472616e73666572206661696c6564a165627a7a72305820b3517cc790738552a1d3bd452fa586f1db04bfff07e57508df3fbd876f93717e0029526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373" 5642 5643 // DeployServiceChainToken deploys a new Klaytn contract, binding an instance of ServiceChainToken to it. 5644 func DeployServiceChainToken(auth *bind.TransactOpts, backend bind.ContractBackend, _bridge common.Address) (common.Address, *types.Transaction, *ServiceChainToken, error) { 5645 parsed, err := abi.JSON(strings.NewReader(ServiceChainTokenABI)) 5646 if err != nil { 5647 return common.Address{}, nil, nil, err 5648 } 5649 5650 address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ServiceChainTokenBin), backend, _bridge) 5651 if err != nil { 5652 return common.Address{}, nil, nil, err 5653 } 5654 return address, tx, &ServiceChainToken{ServiceChainTokenCaller: ServiceChainTokenCaller{contract: contract}, ServiceChainTokenTransactor: ServiceChainTokenTransactor{contract: contract}, ServiceChainTokenFilterer: ServiceChainTokenFilterer{contract: contract}}, nil 5655 } 5656 5657 // ServiceChainToken is an auto generated Go binding around a Klaytn contract. 5658 type ServiceChainToken struct { 5659 ServiceChainTokenCaller // Read-only binding to the contract 5660 ServiceChainTokenTransactor // Write-only binding to the contract 5661 ServiceChainTokenFilterer // Log filterer for contract events 5662 } 5663 5664 // ServiceChainTokenCaller is an auto generated read-only Go binding around a Klaytn contract. 5665 type ServiceChainTokenCaller struct { 5666 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5667 } 5668 5669 // ServiceChainTokenTransactor is an auto generated write-only Go binding around a Klaytn contract. 5670 type ServiceChainTokenTransactor struct { 5671 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5672 } 5673 5674 // ServiceChainTokenFilterer is an auto generated log filtering Go binding around a Klaytn contract events. 5675 type ServiceChainTokenFilterer struct { 5676 contract *bind.BoundContract // Generic contract wrapper for the low level calls 5677 } 5678 5679 // ServiceChainTokenSession is an auto generated Go binding around a Klaytn contract, 5680 // with pre-set call and transact options. 5681 type ServiceChainTokenSession struct { 5682 Contract *ServiceChainToken // Generic contract binding to set the session for 5683 CallOpts bind.CallOpts // Call options to use throughout this session 5684 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 5685 } 5686 5687 // ServiceChainTokenCallerSession is an auto generated read-only Go binding around a Klaytn contract, 5688 // with pre-set call options. 5689 type ServiceChainTokenCallerSession struct { 5690 Contract *ServiceChainTokenCaller // Generic contract caller binding to set the session for 5691 CallOpts bind.CallOpts // Call options to use throughout this session 5692 } 5693 5694 // ServiceChainTokenTransactorSession is an auto generated write-only Go binding around a Klaytn contract, 5695 // with pre-set transact options. 5696 type ServiceChainTokenTransactorSession struct { 5697 Contract *ServiceChainTokenTransactor // Generic contract transactor binding to set the session for 5698 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 5699 } 5700 5701 // ServiceChainTokenRaw is an auto generated low-level Go binding around a Klaytn contract. 5702 type ServiceChainTokenRaw struct { 5703 Contract *ServiceChainToken // Generic contract binding to access the raw methods on 5704 } 5705 5706 // ServiceChainTokenCallerRaw is an auto generated low-level read-only Go binding around a Klaytn contract. 5707 type ServiceChainTokenCallerRaw struct { 5708 Contract *ServiceChainTokenCaller // Generic read-only contract binding to access the raw methods on 5709 } 5710 5711 // ServiceChainTokenTransactorRaw is an auto generated low-level write-only Go binding around a Klaytn contract. 5712 type ServiceChainTokenTransactorRaw struct { 5713 Contract *ServiceChainTokenTransactor // Generic write-only contract binding to access the raw methods on 5714 } 5715 5716 // NewServiceChainToken creates a new instance of ServiceChainToken, bound to a specific deployed contract. 5717 func NewServiceChainToken(address common.Address, backend bind.ContractBackend) (*ServiceChainToken, error) { 5718 contract, err := bindServiceChainToken(address, backend, backend, backend) 5719 if err != nil { 5720 return nil, err 5721 } 5722 return &ServiceChainToken{ServiceChainTokenCaller: ServiceChainTokenCaller{contract: contract}, ServiceChainTokenTransactor: ServiceChainTokenTransactor{contract: contract}, ServiceChainTokenFilterer: ServiceChainTokenFilterer{contract: contract}}, nil 5723 } 5724 5725 // NewServiceChainTokenCaller creates a new read-only instance of ServiceChainToken, bound to a specific deployed contract. 5726 func NewServiceChainTokenCaller(address common.Address, caller bind.ContractCaller) (*ServiceChainTokenCaller, error) { 5727 contract, err := bindServiceChainToken(address, caller, nil, nil) 5728 if err != nil { 5729 return nil, err 5730 } 5731 return &ServiceChainTokenCaller{contract: contract}, nil 5732 } 5733 5734 // NewServiceChainTokenTransactor creates a new write-only instance of ServiceChainToken, bound to a specific deployed contract. 5735 func NewServiceChainTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*ServiceChainTokenTransactor, error) { 5736 contract, err := bindServiceChainToken(address, nil, transactor, nil) 5737 if err != nil { 5738 return nil, err 5739 } 5740 return &ServiceChainTokenTransactor{contract: contract}, nil 5741 } 5742 5743 // NewServiceChainTokenFilterer creates a new log filterer instance of ServiceChainToken, bound to a specific deployed contract. 5744 func NewServiceChainTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*ServiceChainTokenFilterer, error) { 5745 contract, err := bindServiceChainToken(address, nil, nil, filterer) 5746 if err != nil { 5747 return nil, err 5748 } 5749 return &ServiceChainTokenFilterer{contract: contract}, nil 5750 } 5751 5752 // bindServiceChainToken binds a generic wrapper to an already deployed contract. 5753 func bindServiceChainToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 5754 parsed, err := abi.JSON(strings.NewReader(ServiceChainTokenABI)) 5755 if err != nil { 5756 return nil, err 5757 } 5758 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 5759 } 5760 5761 // Call invokes the (constant) contract method with params as input values and 5762 // sets the output to result. The result type might be a single field for simple 5763 // returns, a slice of interfaces for anonymous returns and a struct for named 5764 // returns. 5765 func (_ServiceChainToken *ServiceChainTokenRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5766 return _ServiceChainToken.Contract.ServiceChainTokenCaller.contract.Call(opts, result, method, params...) 5767 } 5768 5769 // Transfer initiates a plain transaction to move funds to the contract, calling 5770 // its default method if one is available. 5771 func (_ServiceChainToken *ServiceChainTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5772 return _ServiceChainToken.Contract.ServiceChainTokenTransactor.contract.Transfer(opts) 5773 } 5774 5775 // Transact invokes the (paid) contract method with params as input values. 5776 func (_ServiceChainToken *ServiceChainTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5777 return _ServiceChainToken.Contract.ServiceChainTokenTransactor.contract.Transact(opts, method, params...) 5778 } 5779 5780 // Call invokes the (constant) contract method with params as input values and 5781 // sets the output to result. The result type might be a single field for simple 5782 // returns, a slice of interfaces for anonymous returns and a struct for named 5783 // returns. 5784 func (_ServiceChainToken *ServiceChainTokenCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { 5785 return _ServiceChainToken.Contract.contract.Call(opts, result, method, params...) 5786 } 5787 5788 // Transfer initiates a plain transaction to move funds to the contract, calling 5789 // its default method if one is available. 5790 func (_ServiceChainToken *ServiceChainTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 5791 return _ServiceChainToken.Contract.contract.Transfer(opts) 5792 } 5793 5794 // Transact invokes the (paid) contract method with params as input values. 5795 func (_ServiceChainToken *ServiceChainTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 5796 return _ServiceChainToken.Contract.contract.Transact(opts, method, params...) 5797 } 5798 5799 // DECIMALS is a free data retrieval call binding the contract method 0x2e0f2625. 5800 // 5801 // Solidity: function DECIMALS() view returns(uint8) 5802 func (_ServiceChainToken *ServiceChainTokenCaller) DECIMALS(opts *bind.CallOpts) (uint8, error) { 5803 var ( 5804 ret0 = new(uint8) 5805 ) 5806 out := ret0 5807 err := _ServiceChainToken.contract.Call(opts, out, "DECIMALS") 5808 return *ret0, err 5809 } 5810 5811 // DECIMALS is a free data retrieval call binding the contract method 0x2e0f2625. 5812 // 5813 // Solidity: function DECIMALS() view returns(uint8) 5814 func (_ServiceChainToken *ServiceChainTokenSession) DECIMALS() (uint8, error) { 5815 return _ServiceChainToken.Contract.DECIMALS(&_ServiceChainToken.CallOpts) 5816 } 5817 5818 // DECIMALS is a free data retrieval call binding the contract method 0x2e0f2625. 5819 // 5820 // Solidity: function DECIMALS() view returns(uint8) 5821 func (_ServiceChainToken *ServiceChainTokenCallerSession) DECIMALS() (uint8, error) { 5822 return _ServiceChainToken.Contract.DECIMALS(&_ServiceChainToken.CallOpts) 5823 } 5824 5825 // INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc. 5826 // 5827 // Solidity: function INITIAL_SUPPLY() view returns(uint256) 5828 func (_ServiceChainToken *ServiceChainTokenCaller) INITIALSUPPLY(opts *bind.CallOpts) (*big.Int, error) { 5829 var ( 5830 ret0 = new(*big.Int) 5831 ) 5832 out := ret0 5833 err := _ServiceChainToken.contract.Call(opts, out, "INITIAL_SUPPLY") 5834 return *ret0, err 5835 } 5836 5837 // INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc. 5838 // 5839 // Solidity: function INITIAL_SUPPLY() view returns(uint256) 5840 func (_ServiceChainToken *ServiceChainTokenSession) INITIALSUPPLY() (*big.Int, error) { 5841 return _ServiceChainToken.Contract.INITIALSUPPLY(&_ServiceChainToken.CallOpts) 5842 } 5843 5844 // INITIALSUPPLY is a free data retrieval call binding the contract method 0x2ff2e9dc. 5845 // 5846 // Solidity: function INITIAL_SUPPLY() view returns(uint256) 5847 func (_ServiceChainToken *ServiceChainTokenCallerSession) INITIALSUPPLY() (*big.Int, error) { 5848 return _ServiceChainToken.Contract.INITIALSUPPLY(&_ServiceChainToken.CallOpts) 5849 } 5850 5851 // NAME is a free data retrieval call binding the contract method 0xa3f4df7e. 5852 // 5853 // Solidity: function NAME() view returns(string) 5854 func (_ServiceChainToken *ServiceChainTokenCaller) NAME(opts *bind.CallOpts) (string, error) { 5855 var ( 5856 ret0 = new(string) 5857 ) 5858 out := ret0 5859 err := _ServiceChainToken.contract.Call(opts, out, "NAME") 5860 return *ret0, err 5861 } 5862 5863 // NAME is a free data retrieval call binding the contract method 0xa3f4df7e. 5864 // 5865 // Solidity: function NAME() view returns(string) 5866 func (_ServiceChainToken *ServiceChainTokenSession) NAME() (string, error) { 5867 return _ServiceChainToken.Contract.NAME(&_ServiceChainToken.CallOpts) 5868 } 5869 5870 // NAME is a free data retrieval call binding the contract method 0xa3f4df7e. 5871 // 5872 // Solidity: function NAME() view returns(string) 5873 func (_ServiceChainToken *ServiceChainTokenCallerSession) NAME() (string, error) { 5874 return _ServiceChainToken.Contract.NAME(&_ServiceChainToken.CallOpts) 5875 } 5876 5877 // SYMBOL is a free data retrieval call binding the contract method 0xf76f8d78. 5878 // 5879 // Solidity: function SYMBOL() view returns(string) 5880 func (_ServiceChainToken *ServiceChainTokenCaller) SYMBOL(opts *bind.CallOpts) (string, error) { 5881 var ( 5882 ret0 = new(string) 5883 ) 5884 out := ret0 5885 err := _ServiceChainToken.contract.Call(opts, out, "SYMBOL") 5886 return *ret0, err 5887 } 5888 5889 // SYMBOL is a free data retrieval call binding the contract method 0xf76f8d78. 5890 // 5891 // Solidity: function SYMBOL() view returns(string) 5892 func (_ServiceChainToken *ServiceChainTokenSession) SYMBOL() (string, error) { 5893 return _ServiceChainToken.Contract.SYMBOL(&_ServiceChainToken.CallOpts) 5894 } 5895 5896 // SYMBOL is a free data retrieval call binding the contract method 0xf76f8d78. 5897 // 5898 // Solidity: function SYMBOL() view returns(string) 5899 func (_ServiceChainToken *ServiceChainTokenCallerSession) SYMBOL() (string, error) { 5900 return _ServiceChainToken.Contract.SYMBOL(&_ServiceChainToken.CallOpts) 5901 } 5902 5903 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 5904 // 5905 // Solidity: function allowance(address owner, address spender) view returns(uint256) 5906 func (_ServiceChainToken *ServiceChainTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { 5907 var ( 5908 ret0 = new(*big.Int) 5909 ) 5910 out := ret0 5911 err := _ServiceChainToken.contract.Call(opts, out, "allowance", owner, spender) 5912 return *ret0, err 5913 } 5914 5915 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 5916 // 5917 // Solidity: function allowance(address owner, address spender) view returns(uint256) 5918 func (_ServiceChainToken *ServiceChainTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 5919 return _ServiceChainToken.Contract.Allowance(&_ServiceChainToken.CallOpts, owner, spender) 5920 } 5921 5922 // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. 5923 // 5924 // Solidity: function allowance(address owner, address spender) view returns(uint256) 5925 func (_ServiceChainToken *ServiceChainTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { 5926 return _ServiceChainToken.Contract.Allowance(&_ServiceChainToken.CallOpts, owner, spender) 5927 } 5928 5929 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 5930 // 5931 // Solidity: function balanceOf(address account) view returns(uint256) 5932 func (_ServiceChainToken *ServiceChainTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { 5933 var ( 5934 ret0 = new(*big.Int) 5935 ) 5936 out := ret0 5937 err := _ServiceChainToken.contract.Call(opts, out, "balanceOf", account) 5938 return *ret0, err 5939 } 5940 5941 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 5942 // 5943 // Solidity: function balanceOf(address account) view returns(uint256) 5944 func (_ServiceChainToken *ServiceChainTokenSession) BalanceOf(account common.Address) (*big.Int, error) { 5945 return _ServiceChainToken.Contract.BalanceOf(&_ServiceChainToken.CallOpts, account) 5946 } 5947 5948 // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. 5949 // 5950 // Solidity: function balanceOf(address account) view returns(uint256) 5951 func (_ServiceChainToken *ServiceChainTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { 5952 return _ServiceChainToken.Contract.BalanceOf(&_ServiceChainToken.CallOpts, account) 5953 } 5954 5955 // Bridge is a free data retrieval call binding the contract method 0xe78cea92. 5956 // 5957 // Solidity: function bridge() view returns(address) 5958 func (_ServiceChainToken *ServiceChainTokenCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { 5959 var ( 5960 ret0 = new(common.Address) 5961 ) 5962 out := ret0 5963 err := _ServiceChainToken.contract.Call(opts, out, "bridge") 5964 return *ret0, err 5965 } 5966 5967 // Bridge is a free data retrieval call binding the contract method 0xe78cea92. 5968 // 5969 // Solidity: function bridge() view returns(address) 5970 func (_ServiceChainToken *ServiceChainTokenSession) Bridge() (common.Address, error) { 5971 return _ServiceChainToken.Contract.Bridge(&_ServiceChainToken.CallOpts) 5972 } 5973 5974 // Bridge is a free data retrieval call binding the contract method 0xe78cea92. 5975 // 5976 // Solidity: function bridge() view returns(address) 5977 func (_ServiceChainToken *ServiceChainTokenCallerSession) Bridge() (common.Address, error) { 5978 return _ServiceChainToken.Contract.Bridge(&_ServiceChainToken.CallOpts) 5979 } 5980 5981 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 5982 // 5983 // Solidity: function isMinter(address account) view returns(bool) 5984 func (_ServiceChainToken *ServiceChainTokenCaller) IsMinter(opts *bind.CallOpts, account common.Address) (bool, error) { 5985 var ( 5986 ret0 = new(bool) 5987 ) 5988 out := ret0 5989 err := _ServiceChainToken.contract.Call(opts, out, "isMinter", account) 5990 return *ret0, err 5991 } 5992 5993 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 5994 // 5995 // Solidity: function isMinter(address account) view returns(bool) 5996 func (_ServiceChainToken *ServiceChainTokenSession) IsMinter(account common.Address) (bool, error) { 5997 return _ServiceChainToken.Contract.IsMinter(&_ServiceChainToken.CallOpts, account) 5998 } 5999 6000 // IsMinter is a free data retrieval call binding the contract method 0xaa271e1a. 6001 // 6002 // Solidity: function isMinter(address account) view returns(bool) 6003 func (_ServiceChainToken *ServiceChainTokenCallerSession) IsMinter(account common.Address) (bool, error) { 6004 return _ServiceChainToken.Contract.IsMinter(&_ServiceChainToken.CallOpts, account) 6005 } 6006 6007 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 6008 // 6009 // Solidity: function isOwner() view returns(bool) 6010 func (_ServiceChainToken *ServiceChainTokenCaller) IsOwner(opts *bind.CallOpts) (bool, error) { 6011 var ( 6012 ret0 = new(bool) 6013 ) 6014 out := ret0 6015 err := _ServiceChainToken.contract.Call(opts, out, "isOwner") 6016 return *ret0, err 6017 } 6018 6019 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 6020 // 6021 // Solidity: function isOwner() view returns(bool) 6022 func (_ServiceChainToken *ServiceChainTokenSession) IsOwner() (bool, error) { 6023 return _ServiceChainToken.Contract.IsOwner(&_ServiceChainToken.CallOpts) 6024 } 6025 6026 // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. 6027 // 6028 // Solidity: function isOwner() view returns(bool) 6029 func (_ServiceChainToken *ServiceChainTokenCallerSession) IsOwner() (bool, error) { 6030 return _ServiceChainToken.Contract.IsOwner(&_ServiceChainToken.CallOpts) 6031 } 6032 6033 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 6034 // 6035 // Solidity: function owner() view returns(address) 6036 func (_ServiceChainToken *ServiceChainTokenCaller) Owner(opts *bind.CallOpts) (common.Address, error) { 6037 var ( 6038 ret0 = new(common.Address) 6039 ) 6040 out := ret0 6041 err := _ServiceChainToken.contract.Call(opts, out, "owner") 6042 return *ret0, err 6043 } 6044 6045 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 6046 // 6047 // Solidity: function owner() view returns(address) 6048 func (_ServiceChainToken *ServiceChainTokenSession) Owner() (common.Address, error) { 6049 return _ServiceChainToken.Contract.Owner(&_ServiceChainToken.CallOpts) 6050 } 6051 6052 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 6053 // 6054 // Solidity: function owner() view returns(address) 6055 func (_ServiceChainToken *ServiceChainTokenCallerSession) Owner() (common.Address, error) { 6056 return _ServiceChainToken.Contract.Owner(&_ServiceChainToken.CallOpts) 6057 } 6058 6059 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 6060 // 6061 // Solidity: function totalSupply() view returns(uint256) 6062 func (_ServiceChainToken *ServiceChainTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { 6063 var ( 6064 ret0 = new(*big.Int) 6065 ) 6066 out := ret0 6067 err := _ServiceChainToken.contract.Call(opts, out, "totalSupply") 6068 return *ret0, err 6069 } 6070 6071 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 6072 // 6073 // Solidity: function totalSupply() view returns(uint256) 6074 func (_ServiceChainToken *ServiceChainTokenSession) TotalSupply() (*big.Int, error) { 6075 return _ServiceChainToken.Contract.TotalSupply(&_ServiceChainToken.CallOpts) 6076 } 6077 6078 // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. 6079 // 6080 // Solidity: function totalSupply() view returns(uint256) 6081 func (_ServiceChainToken *ServiceChainTokenCallerSession) TotalSupply() (*big.Int, error) { 6082 return _ServiceChainToken.Contract.TotalSupply(&_ServiceChainToken.CallOpts) 6083 } 6084 6085 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 6086 // 6087 // Solidity: function addMinter(address account) returns() 6088 func (_ServiceChainToken *ServiceChainTokenTransactor) AddMinter(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { 6089 return _ServiceChainToken.contract.Transact(opts, "addMinter", account) 6090 } 6091 6092 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 6093 // 6094 // Solidity: function addMinter(address account) returns() 6095 func (_ServiceChainToken *ServiceChainTokenSession) AddMinter(account common.Address) (*types.Transaction, error) { 6096 return _ServiceChainToken.Contract.AddMinter(&_ServiceChainToken.TransactOpts, account) 6097 } 6098 6099 // AddMinter is a paid mutator transaction binding the contract method 0x983b2d56. 6100 // 6101 // Solidity: function addMinter(address account) returns() 6102 func (_ServiceChainToken *ServiceChainTokenTransactorSession) AddMinter(account common.Address) (*types.Transaction, error) { 6103 return _ServiceChainToken.Contract.AddMinter(&_ServiceChainToken.TransactOpts, account) 6104 } 6105 6106 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 6107 // 6108 // Solidity: function approve(address spender, uint256 value) returns(bool) 6109 func (_ServiceChainToken *ServiceChainTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { 6110 return _ServiceChainToken.contract.Transact(opts, "approve", spender, value) 6111 } 6112 6113 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 6114 // 6115 // Solidity: function approve(address spender, uint256 value) returns(bool) 6116 func (_ServiceChainToken *ServiceChainTokenSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 6117 return _ServiceChainToken.Contract.Approve(&_ServiceChainToken.TransactOpts, spender, value) 6118 } 6119 6120 // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. 6121 // 6122 // Solidity: function approve(address spender, uint256 value) returns(bool) 6123 func (_ServiceChainToken *ServiceChainTokenTransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { 6124 return _ServiceChainToken.Contract.Approve(&_ServiceChainToken.TransactOpts, spender, value) 6125 } 6126 6127 // Burn is a paid mutator transaction binding the contract method 0x42966c68. 6128 // 6129 // Solidity: function burn(uint256 amount) returns() 6130 func (_ServiceChainToken *ServiceChainTokenTransactor) Burn(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) { 6131 return _ServiceChainToken.contract.Transact(opts, "burn", amount) 6132 } 6133 6134 // Burn is a paid mutator transaction binding the contract method 0x42966c68. 6135 // 6136 // Solidity: function burn(uint256 amount) returns() 6137 func (_ServiceChainToken *ServiceChainTokenSession) Burn(amount *big.Int) (*types.Transaction, error) { 6138 return _ServiceChainToken.Contract.Burn(&_ServiceChainToken.TransactOpts, amount) 6139 } 6140 6141 // Burn is a paid mutator transaction binding the contract method 0x42966c68. 6142 // 6143 // Solidity: function burn(uint256 amount) returns() 6144 func (_ServiceChainToken *ServiceChainTokenTransactorSession) Burn(amount *big.Int) (*types.Transaction, error) { 6145 return _ServiceChainToken.Contract.Burn(&_ServiceChainToken.TransactOpts, amount) 6146 } 6147 6148 // BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. 6149 // 6150 // Solidity: function burnFrom(address account, uint256 amount) returns() 6151 func (_ServiceChainToken *ServiceChainTokenTransactor) BurnFrom(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { 6152 return _ServiceChainToken.contract.Transact(opts, "burnFrom", account, amount) 6153 } 6154 6155 // BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. 6156 // 6157 // Solidity: function burnFrom(address account, uint256 amount) returns() 6158 func (_ServiceChainToken *ServiceChainTokenSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { 6159 return _ServiceChainToken.Contract.BurnFrom(&_ServiceChainToken.TransactOpts, account, amount) 6160 } 6161 6162 // BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. 6163 // 6164 // Solidity: function burnFrom(address account, uint256 amount) returns() 6165 func (_ServiceChainToken *ServiceChainTokenTransactorSession) BurnFrom(account common.Address, amount *big.Int) (*types.Transaction, error) { 6166 return _ServiceChainToken.Contract.BurnFrom(&_ServiceChainToken.TransactOpts, account, amount) 6167 } 6168 6169 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 6170 // 6171 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 6172 func (_ServiceChainToken *ServiceChainTokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 6173 return _ServiceChainToken.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) 6174 } 6175 6176 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 6177 // 6178 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 6179 func (_ServiceChainToken *ServiceChainTokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 6180 return _ServiceChainToken.Contract.DecreaseAllowance(&_ServiceChainToken.TransactOpts, spender, subtractedValue) 6181 } 6182 6183 // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. 6184 // 6185 // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) 6186 func (_ServiceChainToken *ServiceChainTokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { 6187 return _ServiceChainToken.Contract.DecreaseAllowance(&_ServiceChainToken.TransactOpts, spender, subtractedValue) 6188 } 6189 6190 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 6191 // 6192 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 6193 func (_ServiceChainToken *ServiceChainTokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 6194 return _ServiceChainToken.contract.Transact(opts, "increaseAllowance", spender, addedValue) 6195 } 6196 6197 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 6198 // 6199 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 6200 func (_ServiceChainToken *ServiceChainTokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 6201 return _ServiceChainToken.Contract.IncreaseAllowance(&_ServiceChainToken.TransactOpts, spender, addedValue) 6202 } 6203 6204 // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. 6205 // 6206 // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) 6207 func (_ServiceChainToken *ServiceChainTokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { 6208 return _ServiceChainToken.Contract.IncreaseAllowance(&_ServiceChainToken.TransactOpts, spender, addedValue) 6209 } 6210 6211 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 6212 // 6213 // Solidity: function mint(address account, uint256 amount) returns(bool) 6214 func (_ServiceChainToken *ServiceChainTokenTransactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { 6215 return _ServiceChainToken.contract.Transact(opts, "mint", account, amount) 6216 } 6217 6218 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 6219 // 6220 // Solidity: function mint(address account, uint256 amount) returns(bool) 6221 func (_ServiceChainToken *ServiceChainTokenSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { 6222 return _ServiceChainToken.Contract.Mint(&_ServiceChainToken.TransactOpts, account, amount) 6223 } 6224 6225 // Mint is a paid mutator transaction binding the contract method 0x40c10f19. 6226 // 6227 // Solidity: function mint(address account, uint256 amount) returns(bool) 6228 func (_ServiceChainToken *ServiceChainTokenTransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { 6229 return _ServiceChainToken.Contract.Mint(&_ServiceChainToken.TransactOpts, account, amount) 6230 } 6231 6232 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 6233 // 6234 // Solidity: function renounceMinter() returns() 6235 func (_ServiceChainToken *ServiceChainTokenTransactor) RenounceMinter(opts *bind.TransactOpts) (*types.Transaction, error) { 6236 return _ServiceChainToken.contract.Transact(opts, "renounceMinter") 6237 } 6238 6239 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 6240 // 6241 // Solidity: function renounceMinter() returns() 6242 func (_ServiceChainToken *ServiceChainTokenSession) RenounceMinter() (*types.Transaction, error) { 6243 return _ServiceChainToken.Contract.RenounceMinter(&_ServiceChainToken.TransactOpts) 6244 } 6245 6246 // RenounceMinter is a paid mutator transaction binding the contract method 0x98650275. 6247 // 6248 // Solidity: function renounceMinter() returns() 6249 func (_ServiceChainToken *ServiceChainTokenTransactorSession) RenounceMinter() (*types.Transaction, error) { 6250 return _ServiceChainToken.Contract.RenounceMinter(&_ServiceChainToken.TransactOpts) 6251 } 6252 6253 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 6254 // 6255 // Solidity: function renounceOwnership() returns() 6256 func (_ServiceChainToken *ServiceChainTokenTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { 6257 return _ServiceChainToken.contract.Transact(opts, "renounceOwnership") 6258 } 6259 6260 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 6261 // 6262 // Solidity: function renounceOwnership() returns() 6263 func (_ServiceChainToken *ServiceChainTokenSession) RenounceOwnership() (*types.Transaction, error) { 6264 return _ServiceChainToken.Contract.RenounceOwnership(&_ServiceChainToken.TransactOpts) 6265 } 6266 6267 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 6268 // 6269 // Solidity: function renounceOwnership() returns() 6270 func (_ServiceChainToken *ServiceChainTokenTransactorSession) RenounceOwnership() (*types.Transaction, error) { 6271 return _ServiceChainToken.Contract.RenounceOwnership(&_ServiceChainToken.TransactOpts) 6272 } 6273 6274 // RequestValueTransfer is a paid mutator transaction binding the contract method 0x3dc3c9e1. 6275 // 6276 // Solidity: function requestValueTransfer(uint256 _amount, address _to, uint256 _feeLimit, bytes _extraData) returns() 6277 func (_ServiceChainToken *ServiceChainTokenTransactor) RequestValueTransfer(opts *bind.TransactOpts, _amount *big.Int, _to common.Address, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 6278 return _ServiceChainToken.contract.Transact(opts, "requestValueTransfer", _amount, _to, _feeLimit, _extraData) 6279 } 6280 6281 // RequestValueTransfer is a paid mutator transaction binding the contract method 0x3dc3c9e1. 6282 // 6283 // Solidity: function requestValueTransfer(uint256 _amount, address _to, uint256 _feeLimit, bytes _extraData) returns() 6284 func (_ServiceChainToken *ServiceChainTokenSession) RequestValueTransfer(_amount *big.Int, _to common.Address, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 6285 return _ServiceChainToken.Contract.RequestValueTransfer(&_ServiceChainToken.TransactOpts, _amount, _to, _feeLimit, _extraData) 6286 } 6287 6288 // RequestValueTransfer is a paid mutator transaction binding the contract method 0x3dc3c9e1. 6289 // 6290 // Solidity: function requestValueTransfer(uint256 _amount, address _to, uint256 _feeLimit, bytes _extraData) returns() 6291 func (_ServiceChainToken *ServiceChainTokenTransactorSession) RequestValueTransfer(_amount *big.Int, _to common.Address, _feeLimit *big.Int, _extraData []byte) (*types.Transaction, error) { 6292 return _ServiceChainToken.Contract.RequestValueTransfer(&_ServiceChainToken.TransactOpts, _amount, _to, _feeLimit, _extraData) 6293 } 6294 6295 // SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. 6296 // 6297 // Solidity: function setBridge(address _bridge) returns() 6298 func (_ServiceChainToken *ServiceChainTokenTransactor) SetBridge(opts *bind.TransactOpts, _bridge common.Address) (*types.Transaction, error) { 6299 return _ServiceChainToken.contract.Transact(opts, "setBridge", _bridge) 6300 } 6301 6302 // SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. 6303 // 6304 // Solidity: function setBridge(address _bridge) returns() 6305 func (_ServiceChainToken *ServiceChainTokenSession) SetBridge(_bridge common.Address) (*types.Transaction, error) { 6306 return _ServiceChainToken.Contract.SetBridge(&_ServiceChainToken.TransactOpts, _bridge) 6307 } 6308 6309 // SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. 6310 // 6311 // Solidity: function setBridge(address _bridge) returns() 6312 func (_ServiceChainToken *ServiceChainTokenTransactorSession) SetBridge(_bridge common.Address) (*types.Transaction, error) { 6313 return _ServiceChainToken.Contract.SetBridge(&_ServiceChainToken.TransactOpts, _bridge) 6314 } 6315 6316 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 6317 // 6318 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 6319 func (_ServiceChainToken *ServiceChainTokenTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 6320 return _ServiceChainToken.contract.Transact(opts, "transfer", recipient, amount) 6321 } 6322 6323 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 6324 // 6325 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 6326 func (_ServiceChainToken *ServiceChainTokenSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 6327 return _ServiceChainToken.Contract.Transfer(&_ServiceChainToken.TransactOpts, recipient, amount) 6328 } 6329 6330 // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. 6331 // 6332 // Solidity: function transfer(address recipient, uint256 amount) returns(bool) 6333 func (_ServiceChainToken *ServiceChainTokenTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { 6334 return _ServiceChainToken.Contract.Transfer(&_ServiceChainToken.TransactOpts, recipient, amount) 6335 } 6336 6337 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 6338 // 6339 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 6340 func (_ServiceChainToken *ServiceChainTokenTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 6341 return _ServiceChainToken.contract.Transact(opts, "transferFrom", sender, recipient, amount) 6342 } 6343 6344 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 6345 // 6346 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 6347 func (_ServiceChainToken *ServiceChainTokenSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 6348 return _ServiceChainToken.Contract.TransferFrom(&_ServiceChainToken.TransactOpts, sender, recipient, amount) 6349 } 6350 6351 // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. 6352 // 6353 // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) 6354 func (_ServiceChainToken *ServiceChainTokenTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { 6355 return _ServiceChainToken.Contract.TransferFrom(&_ServiceChainToken.TransactOpts, sender, recipient, amount) 6356 } 6357 6358 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 6359 // 6360 // Solidity: function transferOwnership(address newOwner) returns() 6361 func (_ServiceChainToken *ServiceChainTokenTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { 6362 return _ServiceChainToken.contract.Transact(opts, "transferOwnership", newOwner) 6363 } 6364 6365 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 6366 // 6367 // Solidity: function transferOwnership(address newOwner) returns() 6368 func (_ServiceChainToken *ServiceChainTokenSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 6369 return _ServiceChainToken.Contract.TransferOwnership(&_ServiceChainToken.TransactOpts, newOwner) 6370 } 6371 6372 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 6373 // 6374 // Solidity: function transferOwnership(address newOwner) returns() 6375 func (_ServiceChainToken *ServiceChainTokenTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 6376 return _ServiceChainToken.Contract.TransferOwnership(&_ServiceChainToken.TransactOpts, newOwner) 6377 } 6378 6379 // ServiceChainTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ServiceChainToken contract. 6380 type ServiceChainTokenApprovalIterator struct { 6381 Event *ServiceChainTokenApproval // Event containing the contract specifics and raw log 6382 6383 contract *bind.BoundContract // Generic contract to use for unpacking event data 6384 event string // Event name to use for unpacking event data 6385 6386 logs chan types.Log // Log channel receiving the found contract events 6387 sub klaytn.Subscription // Subscription for errors, completion and termination 6388 done bool // Whether the subscription completed delivering logs 6389 fail error // Occurred error to stop iteration 6390 } 6391 6392 // Next advances the iterator to the subsequent event, returning whether there 6393 // are any more events found. In case of a retrieval or parsing error, false is 6394 // returned and Error() can be queried for the exact failure. 6395 func (it *ServiceChainTokenApprovalIterator) Next() bool { 6396 // If the iterator failed, stop iterating 6397 if it.fail != nil { 6398 return false 6399 } 6400 // If the iterator completed, deliver directly whatever's available 6401 if it.done { 6402 select { 6403 case log := <-it.logs: 6404 it.Event = new(ServiceChainTokenApproval) 6405 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6406 it.fail = err 6407 return false 6408 } 6409 it.Event.Raw = log 6410 return true 6411 6412 default: 6413 return false 6414 } 6415 } 6416 // Iterator still in progress, wait for either a data or an error event 6417 select { 6418 case log := <-it.logs: 6419 it.Event = new(ServiceChainTokenApproval) 6420 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6421 it.fail = err 6422 return false 6423 } 6424 it.Event.Raw = log 6425 return true 6426 6427 case err := <-it.sub.Err(): 6428 it.done = true 6429 it.fail = err 6430 return it.Next() 6431 } 6432 } 6433 6434 // Error returns any retrieval or parsing error occurred during filtering. 6435 func (it *ServiceChainTokenApprovalIterator) Error() error { 6436 return it.fail 6437 } 6438 6439 // Close terminates the iteration process, releasing any pending underlying 6440 // resources. 6441 func (it *ServiceChainTokenApprovalIterator) Close() error { 6442 it.sub.Unsubscribe() 6443 return nil 6444 } 6445 6446 // ServiceChainTokenApproval represents a Approval event raised by the ServiceChainToken contract. 6447 type ServiceChainTokenApproval struct { 6448 Owner common.Address 6449 Spender common.Address 6450 Value *big.Int 6451 Raw types.Log // Blockchain specific contextual infos 6452 } 6453 6454 // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 6455 // 6456 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 6457 func (_ServiceChainToken *ServiceChainTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ServiceChainTokenApprovalIterator, error) { 6458 6459 var ownerRule []interface{} 6460 for _, ownerItem := range owner { 6461 ownerRule = append(ownerRule, ownerItem) 6462 } 6463 var spenderRule []interface{} 6464 for _, spenderItem := range spender { 6465 spenderRule = append(spenderRule, spenderItem) 6466 } 6467 6468 logs, sub, err := _ServiceChainToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) 6469 if err != nil { 6470 return nil, err 6471 } 6472 return &ServiceChainTokenApprovalIterator{contract: _ServiceChainToken.contract, event: "Approval", logs: logs, sub: sub}, nil 6473 } 6474 6475 // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 6476 // 6477 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 6478 func (_ServiceChainToken *ServiceChainTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ServiceChainTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { 6479 6480 var ownerRule []interface{} 6481 for _, ownerItem := range owner { 6482 ownerRule = append(ownerRule, ownerItem) 6483 } 6484 var spenderRule []interface{} 6485 for _, spenderItem := range spender { 6486 spenderRule = append(spenderRule, spenderItem) 6487 } 6488 6489 logs, sub, err := _ServiceChainToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) 6490 if err != nil { 6491 return nil, err 6492 } 6493 return event.NewSubscription(func(quit <-chan struct{}) error { 6494 defer sub.Unsubscribe() 6495 for { 6496 select { 6497 case log := <-logs: 6498 // New log arrived, parse the event and forward to the user 6499 event := new(ServiceChainTokenApproval) 6500 if err := _ServiceChainToken.contract.UnpackLog(event, "Approval", log); err != nil { 6501 return err 6502 } 6503 event.Raw = log 6504 6505 select { 6506 case sink <- event: 6507 case err := <-sub.Err(): 6508 return err 6509 case <-quit: 6510 return nil 6511 } 6512 case err := <-sub.Err(): 6513 return err 6514 case <-quit: 6515 return nil 6516 } 6517 } 6518 }), nil 6519 } 6520 6521 // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. 6522 // 6523 // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) 6524 func (_ServiceChainToken *ServiceChainTokenFilterer) ParseApproval(log types.Log) (*ServiceChainTokenApproval, error) { 6525 event := new(ServiceChainTokenApproval) 6526 if err := _ServiceChainToken.contract.UnpackLog(event, "Approval", log); err != nil { 6527 return nil, err 6528 } 6529 return event, nil 6530 } 6531 6532 // ServiceChainTokenMinterAddedIterator is returned from FilterMinterAdded and is used to iterate over the raw logs and unpacked data for MinterAdded events raised by the ServiceChainToken contract. 6533 type ServiceChainTokenMinterAddedIterator struct { 6534 Event *ServiceChainTokenMinterAdded // Event containing the contract specifics and raw log 6535 6536 contract *bind.BoundContract // Generic contract to use for unpacking event data 6537 event string // Event name to use for unpacking event data 6538 6539 logs chan types.Log // Log channel receiving the found contract events 6540 sub klaytn.Subscription // Subscription for errors, completion and termination 6541 done bool // Whether the subscription completed delivering logs 6542 fail error // Occurred error to stop iteration 6543 } 6544 6545 // Next advances the iterator to the subsequent event, returning whether there 6546 // are any more events found. In case of a retrieval or parsing error, false is 6547 // returned and Error() can be queried for the exact failure. 6548 func (it *ServiceChainTokenMinterAddedIterator) Next() bool { 6549 // If the iterator failed, stop iterating 6550 if it.fail != nil { 6551 return false 6552 } 6553 // If the iterator completed, deliver directly whatever's available 6554 if it.done { 6555 select { 6556 case log := <-it.logs: 6557 it.Event = new(ServiceChainTokenMinterAdded) 6558 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6559 it.fail = err 6560 return false 6561 } 6562 it.Event.Raw = log 6563 return true 6564 6565 default: 6566 return false 6567 } 6568 } 6569 // Iterator still in progress, wait for either a data or an error event 6570 select { 6571 case log := <-it.logs: 6572 it.Event = new(ServiceChainTokenMinterAdded) 6573 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6574 it.fail = err 6575 return false 6576 } 6577 it.Event.Raw = log 6578 return true 6579 6580 case err := <-it.sub.Err(): 6581 it.done = true 6582 it.fail = err 6583 return it.Next() 6584 } 6585 } 6586 6587 // Error returns any retrieval or parsing error occurred during filtering. 6588 func (it *ServiceChainTokenMinterAddedIterator) Error() error { 6589 return it.fail 6590 } 6591 6592 // Close terminates the iteration process, releasing any pending underlying 6593 // resources. 6594 func (it *ServiceChainTokenMinterAddedIterator) Close() error { 6595 it.sub.Unsubscribe() 6596 return nil 6597 } 6598 6599 // ServiceChainTokenMinterAdded represents a MinterAdded event raised by the ServiceChainToken contract. 6600 type ServiceChainTokenMinterAdded struct { 6601 Account common.Address 6602 Raw types.Log // Blockchain specific contextual infos 6603 } 6604 6605 // FilterMinterAdded is a free log retrieval operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 6606 // 6607 // Solidity: event MinterAdded(address indexed account) 6608 func (_ServiceChainToken *ServiceChainTokenFilterer) FilterMinterAdded(opts *bind.FilterOpts, account []common.Address) (*ServiceChainTokenMinterAddedIterator, error) { 6609 6610 var accountRule []interface{} 6611 for _, accountItem := range account { 6612 accountRule = append(accountRule, accountItem) 6613 } 6614 6615 logs, sub, err := _ServiceChainToken.contract.FilterLogs(opts, "MinterAdded", accountRule) 6616 if err != nil { 6617 return nil, err 6618 } 6619 return &ServiceChainTokenMinterAddedIterator{contract: _ServiceChainToken.contract, event: "MinterAdded", logs: logs, sub: sub}, nil 6620 } 6621 6622 // WatchMinterAdded is a free log subscription operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 6623 // 6624 // Solidity: event MinterAdded(address indexed account) 6625 func (_ServiceChainToken *ServiceChainTokenFilterer) WatchMinterAdded(opts *bind.WatchOpts, sink chan<- *ServiceChainTokenMinterAdded, account []common.Address) (event.Subscription, error) { 6626 6627 var accountRule []interface{} 6628 for _, accountItem := range account { 6629 accountRule = append(accountRule, accountItem) 6630 } 6631 6632 logs, sub, err := _ServiceChainToken.contract.WatchLogs(opts, "MinterAdded", accountRule) 6633 if err != nil { 6634 return nil, err 6635 } 6636 return event.NewSubscription(func(quit <-chan struct{}) error { 6637 defer sub.Unsubscribe() 6638 for { 6639 select { 6640 case log := <-logs: 6641 // New log arrived, parse the event and forward to the user 6642 event := new(ServiceChainTokenMinterAdded) 6643 if err := _ServiceChainToken.contract.UnpackLog(event, "MinterAdded", log); err != nil { 6644 return err 6645 } 6646 event.Raw = log 6647 6648 select { 6649 case sink <- event: 6650 case err := <-sub.Err(): 6651 return err 6652 case <-quit: 6653 return nil 6654 } 6655 case err := <-sub.Err(): 6656 return err 6657 case <-quit: 6658 return nil 6659 } 6660 } 6661 }), nil 6662 } 6663 6664 // ParseMinterAdded is a log parse operation binding the contract event 0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6. 6665 // 6666 // Solidity: event MinterAdded(address indexed account) 6667 func (_ServiceChainToken *ServiceChainTokenFilterer) ParseMinterAdded(log types.Log) (*ServiceChainTokenMinterAdded, error) { 6668 event := new(ServiceChainTokenMinterAdded) 6669 if err := _ServiceChainToken.contract.UnpackLog(event, "MinterAdded", log); err != nil { 6670 return nil, err 6671 } 6672 return event, nil 6673 } 6674 6675 // ServiceChainTokenMinterRemovedIterator is returned from FilterMinterRemoved and is used to iterate over the raw logs and unpacked data for MinterRemoved events raised by the ServiceChainToken contract. 6676 type ServiceChainTokenMinterRemovedIterator struct { 6677 Event *ServiceChainTokenMinterRemoved // Event containing the contract specifics and raw log 6678 6679 contract *bind.BoundContract // Generic contract to use for unpacking event data 6680 event string // Event name to use for unpacking event data 6681 6682 logs chan types.Log // Log channel receiving the found contract events 6683 sub klaytn.Subscription // Subscription for errors, completion and termination 6684 done bool // Whether the subscription completed delivering logs 6685 fail error // Occurred error to stop iteration 6686 } 6687 6688 // Next advances the iterator to the subsequent event, returning whether there 6689 // are any more events found. In case of a retrieval or parsing error, false is 6690 // returned and Error() can be queried for the exact failure. 6691 func (it *ServiceChainTokenMinterRemovedIterator) Next() bool { 6692 // If the iterator failed, stop iterating 6693 if it.fail != nil { 6694 return false 6695 } 6696 // If the iterator completed, deliver directly whatever's available 6697 if it.done { 6698 select { 6699 case log := <-it.logs: 6700 it.Event = new(ServiceChainTokenMinterRemoved) 6701 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6702 it.fail = err 6703 return false 6704 } 6705 it.Event.Raw = log 6706 return true 6707 6708 default: 6709 return false 6710 } 6711 } 6712 // Iterator still in progress, wait for either a data or an error event 6713 select { 6714 case log := <-it.logs: 6715 it.Event = new(ServiceChainTokenMinterRemoved) 6716 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6717 it.fail = err 6718 return false 6719 } 6720 it.Event.Raw = log 6721 return true 6722 6723 case err := <-it.sub.Err(): 6724 it.done = true 6725 it.fail = err 6726 return it.Next() 6727 } 6728 } 6729 6730 // Error returns any retrieval or parsing error occurred during filtering. 6731 func (it *ServiceChainTokenMinterRemovedIterator) Error() error { 6732 return it.fail 6733 } 6734 6735 // Close terminates the iteration process, releasing any pending underlying 6736 // resources. 6737 func (it *ServiceChainTokenMinterRemovedIterator) Close() error { 6738 it.sub.Unsubscribe() 6739 return nil 6740 } 6741 6742 // ServiceChainTokenMinterRemoved represents a MinterRemoved event raised by the ServiceChainToken contract. 6743 type ServiceChainTokenMinterRemoved struct { 6744 Account common.Address 6745 Raw types.Log // Blockchain specific contextual infos 6746 } 6747 6748 // FilterMinterRemoved is a free log retrieval operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 6749 // 6750 // Solidity: event MinterRemoved(address indexed account) 6751 func (_ServiceChainToken *ServiceChainTokenFilterer) FilterMinterRemoved(opts *bind.FilterOpts, account []common.Address) (*ServiceChainTokenMinterRemovedIterator, error) { 6752 6753 var accountRule []interface{} 6754 for _, accountItem := range account { 6755 accountRule = append(accountRule, accountItem) 6756 } 6757 6758 logs, sub, err := _ServiceChainToken.contract.FilterLogs(opts, "MinterRemoved", accountRule) 6759 if err != nil { 6760 return nil, err 6761 } 6762 return &ServiceChainTokenMinterRemovedIterator{contract: _ServiceChainToken.contract, event: "MinterRemoved", logs: logs, sub: sub}, nil 6763 } 6764 6765 // WatchMinterRemoved is a free log subscription operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 6766 // 6767 // Solidity: event MinterRemoved(address indexed account) 6768 func (_ServiceChainToken *ServiceChainTokenFilterer) WatchMinterRemoved(opts *bind.WatchOpts, sink chan<- *ServiceChainTokenMinterRemoved, account []common.Address) (event.Subscription, error) { 6769 6770 var accountRule []interface{} 6771 for _, accountItem := range account { 6772 accountRule = append(accountRule, accountItem) 6773 } 6774 6775 logs, sub, err := _ServiceChainToken.contract.WatchLogs(opts, "MinterRemoved", accountRule) 6776 if err != nil { 6777 return nil, err 6778 } 6779 return event.NewSubscription(func(quit <-chan struct{}) error { 6780 defer sub.Unsubscribe() 6781 for { 6782 select { 6783 case log := <-logs: 6784 // New log arrived, parse the event and forward to the user 6785 event := new(ServiceChainTokenMinterRemoved) 6786 if err := _ServiceChainToken.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 6787 return err 6788 } 6789 event.Raw = log 6790 6791 select { 6792 case sink <- event: 6793 case err := <-sub.Err(): 6794 return err 6795 case <-quit: 6796 return nil 6797 } 6798 case err := <-sub.Err(): 6799 return err 6800 case <-quit: 6801 return nil 6802 } 6803 } 6804 }), nil 6805 } 6806 6807 // ParseMinterRemoved is a log parse operation binding the contract event 0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692. 6808 // 6809 // Solidity: event MinterRemoved(address indexed account) 6810 func (_ServiceChainToken *ServiceChainTokenFilterer) ParseMinterRemoved(log types.Log) (*ServiceChainTokenMinterRemoved, error) { 6811 event := new(ServiceChainTokenMinterRemoved) 6812 if err := _ServiceChainToken.contract.UnpackLog(event, "MinterRemoved", log); err != nil { 6813 return nil, err 6814 } 6815 return event, nil 6816 } 6817 6818 // ServiceChainTokenOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ServiceChainToken contract. 6819 type ServiceChainTokenOwnershipTransferredIterator struct { 6820 Event *ServiceChainTokenOwnershipTransferred // Event containing the contract specifics and raw log 6821 6822 contract *bind.BoundContract // Generic contract to use for unpacking event data 6823 event string // Event name to use for unpacking event data 6824 6825 logs chan types.Log // Log channel receiving the found contract events 6826 sub klaytn.Subscription // Subscription for errors, completion and termination 6827 done bool // Whether the subscription completed delivering logs 6828 fail error // Occurred error to stop iteration 6829 } 6830 6831 // Next advances the iterator to the subsequent event, returning whether there 6832 // are any more events found. In case of a retrieval or parsing error, false is 6833 // returned and Error() can be queried for the exact failure. 6834 func (it *ServiceChainTokenOwnershipTransferredIterator) Next() bool { 6835 // If the iterator failed, stop iterating 6836 if it.fail != nil { 6837 return false 6838 } 6839 // If the iterator completed, deliver directly whatever's available 6840 if it.done { 6841 select { 6842 case log := <-it.logs: 6843 it.Event = new(ServiceChainTokenOwnershipTransferred) 6844 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6845 it.fail = err 6846 return false 6847 } 6848 it.Event.Raw = log 6849 return true 6850 6851 default: 6852 return false 6853 } 6854 } 6855 // Iterator still in progress, wait for either a data or an error event 6856 select { 6857 case log := <-it.logs: 6858 it.Event = new(ServiceChainTokenOwnershipTransferred) 6859 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6860 it.fail = err 6861 return false 6862 } 6863 it.Event.Raw = log 6864 return true 6865 6866 case err := <-it.sub.Err(): 6867 it.done = true 6868 it.fail = err 6869 return it.Next() 6870 } 6871 } 6872 6873 // Error returns any retrieval or parsing error occurred during filtering. 6874 func (it *ServiceChainTokenOwnershipTransferredIterator) Error() error { 6875 return it.fail 6876 } 6877 6878 // Close terminates the iteration process, releasing any pending underlying 6879 // resources. 6880 func (it *ServiceChainTokenOwnershipTransferredIterator) Close() error { 6881 it.sub.Unsubscribe() 6882 return nil 6883 } 6884 6885 // ServiceChainTokenOwnershipTransferred represents a OwnershipTransferred event raised by the ServiceChainToken contract. 6886 type ServiceChainTokenOwnershipTransferred struct { 6887 PreviousOwner common.Address 6888 NewOwner common.Address 6889 Raw types.Log // Blockchain specific contextual infos 6890 } 6891 6892 // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 6893 // 6894 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 6895 func (_ServiceChainToken *ServiceChainTokenFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ServiceChainTokenOwnershipTransferredIterator, error) { 6896 6897 var previousOwnerRule []interface{} 6898 for _, previousOwnerItem := range previousOwner { 6899 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 6900 } 6901 var newOwnerRule []interface{} 6902 for _, newOwnerItem := range newOwner { 6903 newOwnerRule = append(newOwnerRule, newOwnerItem) 6904 } 6905 6906 logs, sub, err := _ServiceChainToken.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 6907 if err != nil { 6908 return nil, err 6909 } 6910 return &ServiceChainTokenOwnershipTransferredIterator{contract: _ServiceChainToken.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil 6911 } 6912 6913 // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 6914 // 6915 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 6916 func (_ServiceChainToken *ServiceChainTokenFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ServiceChainTokenOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { 6917 6918 var previousOwnerRule []interface{} 6919 for _, previousOwnerItem := range previousOwner { 6920 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 6921 } 6922 var newOwnerRule []interface{} 6923 for _, newOwnerItem := range newOwner { 6924 newOwnerRule = append(newOwnerRule, newOwnerItem) 6925 } 6926 6927 logs, sub, err := _ServiceChainToken.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 6928 if err != nil { 6929 return nil, err 6930 } 6931 return event.NewSubscription(func(quit <-chan struct{}) error { 6932 defer sub.Unsubscribe() 6933 for { 6934 select { 6935 case log := <-logs: 6936 // New log arrived, parse the event and forward to the user 6937 event := new(ServiceChainTokenOwnershipTransferred) 6938 if err := _ServiceChainToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 6939 return err 6940 } 6941 event.Raw = log 6942 6943 select { 6944 case sink <- event: 6945 case err := <-sub.Err(): 6946 return err 6947 case <-quit: 6948 return nil 6949 } 6950 case err := <-sub.Err(): 6951 return err 6952 case <-quit: 6953 return nil 6954 } 6955 } 6956 }), nil 6957 } 6958 6959 // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 6960 // 6961 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 6962 func (_ServiceChainToken *ServiceChainTokenFilterer) ParseOwnershipTransferred(log types.Log) (*ServiceChainTokenOwnershipTransferred, error) { 6963 event := new(ServiceChainTokenOwnershipTransferred) 6964 if err := _ServiceChainToken.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 6965 return nil, err 6966 } 6967 return event, nil 6968 } 6969 6970 // ServiceChainTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ServiceChainToken contract. 6971 type ServiceChainTokenTransferIterator struct { 6972 Event *ServiceChainTokenTransfer // Event containing the contract specifics and raw log 6973 6974 contract *bind.BoundContract // Generic contract to use for unpacking event data 6975 event string // Event name to use for unpacking event data 6976 6977 logs chan types.Log // Log channel receiving the found contract events 6978 sub klaytn.Subscription // Subscription for errors, completion and termination 6979 done bool // Whether the subscription completed delivering logs 6980 fail error // Occurred error to stop iteration 6981 } 6982 6983 // Next advances the iterator to the subsequent event, returning whether there 6984 // are any more events found. In case of a retrieval or parsing error, false is 6985 // returned and Error() can be queried for the exact failure. 6986 func (it *ServiceChainTokenTransferIterator) Next() bool { 6987 // If the iterator failed, stop iterating 6988 if it.fail != nil { 6989 return false 6990 } 6991 // If the iterator completed, deliver directly whatever's available 6992 if it.done { 6993 select { 6994 case log := <-it.logs: 6995 it.Event = new(ServiceChainTokenTransfer) 6996 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 6997 it.fail = err 6998 return false 6999 } 7000 it.Event.Raw = log 7001 return true 7002 7003 default: 7004 return false 7005 } 7006 } 7007 // Iterator still in progress, wait for either a data or an error event 7008 select { 7009 case log := <-it.logs: 7010 it.Event = new(ServiceChainTokenTransfer) 7011 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 7012 it.fail = err 7013 return false 7014 } 7015 it.Event.Raw = log 7016 return true 7017 7018 case err := <-it.sub.Err(): 7019 it.done = true 7020 it.fail = err 7021 return it.Next() 7022 } 7023 } 7024 7025 // Error returns any retrieval or parsing error occurred during filtering. 7026 func (it *ServiceChainTokenTransferIterator) Error() error { 7027 return it.fail 7028 } 7029 7030 // Close terminates the iteration process, releasing any pending underlying 7031 // resources. 7032 func (it *ServiceChainTokenTransferIterator) Close() error { 7033 it.sub.Unsubscribe() 7034 return nil 7035 } 7036 7037 // ServiceChainTokenTransfer represents a Transfer event raised by the ServiceChainToken contract. 7038 type ServiceChainTokenTransfer struct { 7039 From common.Address 7040 To common.Address 7041 Value *big.Int 7042 Raw types.Log // Blockchain specific contextual infos 7043 } 7044 7045 // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 7046 // 7047 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 7048 func (_ServiceChainToken *ServiceChainTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ServiceChainTokenTransferIterator, error) { 7049 7050 var fromRule []interface{} 7051 for _, fromItem := range from { 7052 fromRule = append(fromRule, fromItem) 7053 } 7054 var toRule []interface{} 7055 for _, toItem := range to { 7056 toRule = append(toRule, toItem) 7057 } 7058 7059 logs, sub, err := _ServiceChainToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) 7060 if err != nil { 7061 return nil, err 7062 } 7063 return &ServiceChainTokenTransferIterator{contract: _ServiceChainToken.contract, event: "Transfer", logs: logs, sub: sub}, nil 7064 } 7065 7066 // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 7067 // 7068 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 7069 func (_ServiceChainToken *ServiceChainTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ServiceChainTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { 7070 7071 var fromRule []interface{} 7072 for _, fromItem := range from { 7073 fromRule = append(fromRule, fromItem) 7074 } 7075 var toRule []interface{} 7076 for _, toItem := range to { 7077 toRule = append(toRule, toItem) 7078 } 7079 7080 logs, sub, err := _ServiceChainToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) 7081 if err != nil { 7082 return nil, err 7083 } 7084 return event.NewSubscription(func(quit <-chan struct{}) error { 7085 defer sub.Unsubscribe() 7086 for { 7087 select { 7088 case log := <-logs: 7089 // New log arrived, parse the event and forward to the user 7090 event := new(ServiceChainTokenTransfer) 7091 if err := _ServiceChainToken.contract.UnpackLog(event, "Transfer", log); err != nil { 7092 return err 7093 } 7094 event.Raw = log 7095 7096 select { 7097 case sink <- event: 7098 case err := <-sub.Err(): 7099 return err 7100 case <-quit: 7101 return nil 7102 } 7103 case err := <-sub.Err(): 7104 return err 7105 case <-quit: 7106 return nil 7107 } 7108 } 7109 }), nil 7110 } 7111 7112 // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. 7113 // 7114 // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) 7115 func (_ServiceChainToken *ServiceChainTokenFilterer) ParseTransfer(log types.Log) (*ServiceChainTokenTransfer, error) { 7116 event := new(ServiceChainTokenTransfer) 7117 if err := _ServiceChainToken.contract.UnpackLog(event, "Transfer", log); err != nil { 7118 return nil, err 7119 } 7120 return event, nil 7121 }