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