// Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. package contracts import ( "math/big" "strings" ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) // WmaticABI is the input ABI used to generate the binding from. const WmaticABI = "[{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"string\",\"name\":\"\"}],\"name\":\"name\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[{\"type\":\"bool\",\"name\":\"\"}],\"name\":\"approve\",\"inputs\":[{\"type\":\"address\",\"name\":\"guy\"},{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"totalSupply\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[{\"type\":\"bool\",\"name\":\"\"}],\"name\":\"transferFrom\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\"},{\"type\":\"address\",\"name\":\"dst\"},{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[],\"name\":\"withdraw\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint8\",\"name\":\"\"}],\"name\":\"decimals\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"balanceOf\",\"inputs\":[{\"type\":\"address\",\"name\":\"\"}],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"string\",\"name\":\"\"}],\"name\":\"symbol\",\"inputs\":[],\"constant\":true},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"payable\":false,\"outputs\":[{\"type\":\"bool\",\"name\":\"\"}],\"name\":\"transfer\",\"inputs\":[{\"type\":\"address\",\"name\":\"dst\"},{\"type\":\"uint256\",\"name\":\"wad\"}],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"payable\",\"payable\":true,\"outputs\":[],\"name\":\"deposit\",\"inputs\":[],\"constant\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"payable\":false,\"outputs\":[{\"type\":\"uint256\",\"name\":\"\"}],\"name\":\"allowance\",\"inputs\":[{\"type\":\"address\",\"name\":\"\"},{\"type\":\"address\",\"name\":\"\"}],\"constant\":true},{\"type\":\"fallback\",\"stateMutability\":\"payable\",\"payable\":true},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\",\"indexed\":true},{\"type\":\"address\",\"name\":\"guy\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\",\"indexed\":true},{\"type\":\"address\",\"name\":\"dst\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Deposit\",\"inputs\":[{\"type\":\"address\",\"name\":\"dst\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdrawal\",\"inputs\":[{\"type\":\"address\",\"name\":\"src\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"wad\",\"indexed\":false}],\"anonymous\":false}]" // Wmatic is an auto generated Go binding around an Ethereum contract. type Wmatic struct { WmaticCaller // Read-only binding to the contract WmaticTransactor // Write-only binding to the contract WmaticFilterer // Log filterer for contract events } // WmaticCaller is an auto generated read-only Go binding around an Ethereum contract. type WmaticCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // WmaticTransactor is an auto generated write-only Go binding around an Ethereum contract. type WmaticTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // WmaticFilterer is an auto generated log filtering Go binding around an Ethereum contract events. type WmaticFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } // WmaticSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. type WmaticSession struct { Contract *Wmatic // Generic contract binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // WmaticCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. type WmaticCallerSession struct { Contract *WmaticCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } // WmaticTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. type WmaticTransactorSession struct { Contract *WmaticTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } // WmaticRaw is an auto generated low-level Go binding around an Ethereum contract. type WmaticRaw struct { Contract *Wmatic // Generic contract binding to access the raw methods on } // WmaticCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. type WmaticCallerRaw struct { Contract *WmaticCaller // Generic read-only contract binding to access the raw methods on } // WmaticTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. type WmaticTransactorRaw struct { Contract *WmaticTransactor // Generic write-only contract binding to access the raw methods on } // NewWmatic creates a new instance of Wmatic, bound to a specific deployed contract. func NewWmatic(address common.Address, backend bind.ContractBackend) (*Wmatic, error) { contract, err := bindWmatic(address, backend, backend, backend) if err != nil { return nil, err } return &Wmatic{WmaticCaller: WmaticCaller{contract: contract}, WmaticTransactor: WmaticTransactor{contract: contract}, WmaticFilterer: WmaticFilterer{contract: contract}}, nil } // NewWmaticCaller creates a new read-only instance of Wmatic, bound to a specific deployed contract. func NewWmaticCaller(address common.Address, caller bind.ContractCaller) (*WmaticCaller, error) { contract, err := bindWmatic(address, caller, nil, nil) if err != nil { return nil, err } return &WmaticCaller{contract: contract}, nil } // NewWmaticTransactor creates a new write-only instance of Wmatic, bound to a specific deployed contract. func NewWmaticTransactor(address common.Address, transactor bind.ContractTransactor) (*WmaticTransactor, error) { contract, err := bindWmatic(address, nil, transactor, nil) if err != nil { return nil, err } return &WmaticTransactor{contract: contract}, nil } // NewWmaticFilterer creates a new log filterer instance of Wmatic, bound to a specific deployed contract. func NewWmaticFilterer(address common.Address, filterer bind.ContractFilterer) (*WmaticFilterer, error) { contract, err := bindWmatic(address, nil, nil, filterer) if err != nil { return nil, err } return &WmaticFilterer{contract: contract}, nil } // bindWmatic binds a generic wrapper to an already deployed contract. func bindWmatic(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(WmaticABI)) if err != nil { return nil, err } return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_Wmatic *WmaticRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Wmatic.Contract.WmaticCaller.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_Wmatic *WmaticRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Wmatic.Contract.WmaticTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_Wmatic *WmaticRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _Wmatic.Contract.WmaticTransactor.contract.Transact(opts, method, params...) } // Call invokes the (constant) contract method with params as input values and // sets the output to result. The result type might be a single field for simple // returns, a slice of interfaces for anonymous returns and a struct for named // returns. func (_Wmatic *WmaticCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Wmatic.Contract.contract.Call(opts, result, method, params...) } // Transfer initiates a plain transaction to move funds to the contract, calling // its default method if one is available. func (_Wmatic *WmaticTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Wmatic.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. func (_Wmatic *WmaticTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { return _Wmatic.Contract.contract.Transact(opts, method, params...) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address , address ) view returns(uint256) func (_Wmatic *WmaticCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { var out []interface{} err := _Wmatic.contract.Call(opts, &out, "allowance", arg0, arg1) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address , address ) view returns(uint256) func (_Wmatic *WmaticSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { return _Wmatic.Contract.Allowance(&_Wmatic.CallOpts, arg0, arg1) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address , address ) view returns(uint256) func (_Wmatic *WmaticCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { return _Wmatic.Contract.Allowance(&_Wmatic.CallOpts, arg0, arg1) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address ) view returns(uint256) func (_Wmatic *WmaticCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { var out []interface{} err := _Wmatic.contract.Call(opts, &out, "balanceOf", arg0) if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address ) view returns(uint256) func (_Wmatic *WmaticSession) BalanceOf(arg0 common.Address) (*big.Int, error) { return _Wmatic.Contract.BalanceOf(&_Wmatic.CallOpts, arg0) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address ) view returns(uint256) func (_Wmatic *WmaticCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { return _Wmatic.Contract.BalanceOf(&_Wmatic.CallOpts, arg0) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_Wmatic *WmaticCaller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} err := _Wmatic.contract.Call(opts, &out, "decimals") if err != nil { return *new(uint8), err } out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) return out0, err } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_Wmatic *WmaticSession) Decimals() (uint8, error) { return _Wmatic.Contract.Decimals(&_Wmatic.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) func (_Wmatic *WmaticCallerSession) Decimals() (uint8, error) { return _Wmatic.Contract.Decimals(&_Wmatic.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_Wmatic *WmaticCaller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} err := _Wmatic.contract.Call(opts, &out, "name") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_Wmatic *WmaticSession) Name() (string, error) { return _Wmatic.Contract.Name(&_Wmatic.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) func (_Wmatic *WmaticCallerSession) Name() (string, error) { return _Wmatic.Contract.Name(&_Wmatic.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_Wmatic *WmaticCaller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} err := _Wmatic.contract.Call(opts, &out, "symbol") if err != nil { return *new(string), err } out0 := *abi.ConvertType(out[0], new(string)).(*string) return out0, err } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_Wmatic *WmaticSession) Symbol() (string, error) { return _Wmatic.Contract.Symbol(&_Wmatic.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) func (_Wmatic *WmaticCallerSession) Symbol() (string, error) { return _Wmatic.Contract.Symbol(&_Wmatic.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_Wmatic *WmaticCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} err := _Wmatic.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err } out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_Wmatic *WmaticSession) TotalSupply() (*big.Int, error) { return _Wmatic.Contract.TotalSupply(&_Wmatic.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) func (_Wmatic *WmaticCallerSession) TotalSupply() (*big.Int, error) { return _Wmatic.Contract.TotalSupply(&_Wmatic.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address guy, uint256 wad) returns(bool) func (_Wmatic *WmaticTransactor) Approve(opts *bind.TransactOpts, guy common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.contract.Transact(opts, "approve", guy, wad) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address guy, uint256 wad) returns(bool) func (_Wmatic *WmaticSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.Approve(&_Wmatic.TransactOpts, guy, wad) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address guy, uint256 wad) returns(bool) func (_Wmatic *WmaticTransactorSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.Approve(&_Wmatic.TransactOpts, guy, wad) } // Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. // // Solidity: function deposit() payable returns() func (_Wmatic *WmaticTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { return _Wmatic.contract.Transact(opts, "deposit") } // Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. // // Solidity: function deposit() payable returns() func (_Wmatic *WmaticSession) Deposit() (*types.Transaction, error) { return _Wmatic.Contract.Deposit(&_Wmatic.TransactOpts) } // Deposit is a paid mutator transaction binding the contract method 0xd0e30db0. // // Solidity: function deposit() payable returns() func (_Wmatic *WmaticTransactorSession) Deposit() (*types.Transaction, error) { return _Wmatic.Contract.Deposit(&_Wmatic.TransactOpts) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address dst, uint256 wad) returns(bool) func (_Wmatic *WmaticTransactor) Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.contract.Transact(opts, "transfer", dst, wad) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address dst, uint256 wad) returns(bool) func (_Wmatic *WmaticSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.Transfer(&_Wmatic.TransactOpts, dst, wad) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address dst, uint256 wad) returns(bool) func (_Wmatic *WmaticTransactorSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.Transfer(&_Wmatic.TransactOpts, dst, wad) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) func (_Wmatic *WmaticTransactor) TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.contract.Transact(opts, "transferFrom", src, dst, wad) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) func (_Wmatic *WmaticSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.TransferFrom(&_Wmatic.TransactOpts, src, dst, wad) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address src, address dst, uint256 wad) returns(bool) func (_Wmatic *WmaticTransactorSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.TransferFrom(&_Wmatic.TransactOpts, src, dst, wad) } // Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. // // Solidity: function withdraw(uint256 wad) returns() func (_Wmatic *WmaticTransactor) Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) { return _Wmatic.contract.Transact(opts, "withdraw", wad) } // Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. // // Solidity: function withdraw(uint256 wad) returns() func (_Wmatic *WmaticSession) Withdraw(wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.Withdraw(&_Wmatic.TransactOpts, wad) } // Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d. // // Solidity: function withdraw(uint256 wad) returns() func (_Wmatic *WmaticTransactorSession) Withdraw(wad *big.Int) (*types.Transaction, error) { return _Wmatic.Contract.Withdraw(&_Wmatic.TransactOpts, wad) } // Fallback is a paid mutator transaction binding the contract fallback function. // // Solidity: fallback() payable returns() func (_Wmatic *WmaticTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { return _Wmatic.contract.RawTransact(opts, calldata) } // Fallback is a paid mutator transaction binding the contract fallback function. // // Solidity: fallback() payable returns() func (_Wmatic *WmaticSession) Fallback(calldata []byte) (*types.Transaction, error) { return _Wmatic.Contract.Fallback(&_Wmatic.TransactOpts, calldata) } // Fallback is a paid mutator transaction binding the contract fallback function. // // Solidity: fallback() payable returns() func (_Wmatic *WmaticTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { return _Wmatic.Contract.Fallback(&_Wmatic.TransactOpts, calldata) } // WmaticApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Wmatic contract. type WmaticApprovalIterator struct { Event *WmaticApproval // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *WmaticApprovalIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(WmaticApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(WmaticApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *WmaticApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *WmaticApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } // WmaticApproval represents a Approval event raised by the Wmatic contract. type WmaticApproval struct { Src common.Address Guy common.Address Wad *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) func (_Wmatic *WmaticFilterer) FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*WmaticApprovalIterator, error) { var srcRule []interface{} for _, srcItem := range src { srcRule = append(srcRule, srcItem) } var guyRule []interface{} for _, guyItem := range guy { guyRule = append(guyRule, guyItem) } logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Approval", srcRule, guyRule) if err != nil { return nil, err } return &WmaticApprovalIterator{contract: _Wmatic.contract, event: "Approval", logs: logs, sub: sub}, nil } // WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) func (_Wmatic *WmaticFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WmaticApproval, src []common.Address, guy []common.Address) (event.Subscription, error) { var srcRule []interface{} for _, srcItem := range src { srcRule = append(srcRule, srcItem) } var guyRule []interface{} for _, guyItem := range guy { guyRule = append(guyRule, guyItem) } logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Approval", srcRule, guyRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(WmaticApproval) if err := _Wmatic.contract.UnpackLog(event, "Approval", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed src, address indexed guy, uint256 wad) func (_Wmatic *WmaticFilterer) ParseApproval(log types.Log) (*WmaticApproval, error) { event := new(WmaticApproval) if err := _Wmatic.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } // WmaticDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Wmatic contract. type WmaticDepositIterator struct { Event *WmaticDeposit // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *WmaticDepositIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(WmaticDeposit) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(WmaticDeposit) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *WmaticDepositIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *WmaticDepositIterator) Close() error { it.sub.Unsubscribe() return nil } // WmaticDeposit represents a Deposit event raised by the Wmatic contract. type WmaticDeposit struct { Dst common.Address Wad *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. // // Solidity: event Deposit(address indexed dst, uint256 wad) func (_Wmatic *WmaticFilterer) FilterDeposit(opts *bind.FilterOpts, dst []common.Address) (*WmaticDepositIterator, error) { var dstRule []interface{} for _, dstItem := range dst { dstRule = append(dstRule, dstItem) } logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Deposit", dstRule) if err != nil { return nil, err } return &WmaticDepositIterator{contract: _Wmatic.contract, event: "Deposit", logs: logs, sub: sub}, nil } // WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. // // Solidity: event Deposit(address indexed dst, uint256 wad) func (_Wmatic *WmaticFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WmaticDeposit, dst []common.Address) (event.Subscription, error) { var dstRule []interface{} for _, dstItem := range dst { dstRule = append(dstRule, dstItem) } logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Deposit", dstRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(WmaticDeposit) if err := _Wmatic.contract.UnpackLog(event, "Deposit", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseDeposit is a log parse operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c. // // Solidity: event Deposit(address indexed dst, uint256 wad) func (_Wmatic *WmaticFilterer) ParseDeposit(log types.Log) (*WmaticDeposit, error) { event := new(WmaticDeposit) if err := _Wmatic.contract.UnpackLog(event, "Deposit", log); err != nil { return nil, err } event.Raw = log return event, nil } // WmaticTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Wmatic contract. type WmaticTransferIterator struct { Event *WmaticTransfer // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *WmaticTransferIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(WmaticTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(WmaticTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *WmaticTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *WmaticTransferIterator) Close() error { it.sub.Unsubscribe() return nil } // WmaticTransfer represents a Transfer event raised by the Wmatic contract. type WmaticTransfer struct { Src common.Address Dst common.Address Wad *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) func (_Wmatic *WmaticFilterer) FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*WmaticTransferIterator, error) { var srcRule []interface{} for _, srcItem := range src { srcRule = append(srcRule, srcItem) } var dstRule []interface{} for _, dstItem := range dst { dstRule = append(dstRule, dstItem) } logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Transfer", srcRule, dstRule) if err != nil { return nil, err } return &WmaticTransferIterator{contract: _Wmatic.contract, event: "Transfer", logs: logs, sub: sub}, nil } // WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) func (_Wmatic *WmaticFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WmaticTransfer, src []common.Address, dst []common.Address) (event.Subscription, error) { var srcRule []interface{} for _, srcItem := range src { srcRule = append(srcRule, srcItem) } var dstRule []interface{} for _, dstItem := range dst { dstRule = append(dstRule, dstItem) } logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Transfer", srcRule, dstRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(WmaticTransfer) if err := _Wmatic.contract.UnpackLog(event, "Transfer", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed src, address indexed dst, uint256 wad) func (_Wmatic *WmaticFilterer) ParseTransfer(log types.Log) (*WmaticTransfer, error) { event := new(WmaticTransfer) if err := _Wmatic.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } // WmaticWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the Wmatic contract. type WmaticWithdrawalIterator struct { Event *WmaticWithdrawal // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data logs chan types.Log // Log channel receiving the found contract events sub ethereum.Subscription // Subscription for errors, completion and termination done bool // Whether the subscription completed delivering logs fail error // Occurred error to stop iteration } // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. func (it *WmaticWithdrawalIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false } // If the iterator completed, deliver directly whatever's available if it.done { select { case log := <-it.logs: it.Event = new(WmaticWithdrawal) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true default: return false } } // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: it.Event = new(WmaticWithdrawal) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false } it.Event.Raw = log return true case err := <-it.sub.Err(): it.done = true it.fail = err return it.Next() } } // Error returns any retrieval or parsing error occurred during filtering. func (it *WmaticWithdrawalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. func (it *WmaticWithdrawalIterator) Close() error { it.sub.Unsubscribe() return nil } // WmaticWithdrawal represents a Withdrawal event raised by the Wmatic contract. type WmaticWithdrawal struct { Src common.Address Wad *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterWithdrawal is a free log retrieval operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. // // Solidity: event Withdrawal(address indexed src, uint256 wad) func (_Wmatic *WmaticFilterer) FilterWithdrawal(opts *bind.FilterOpts, src []common.Address) (*WmaticWithdrawalIterator, error) { var srcRule []interface{} for _, srcItem := range src { srcRule = append(srcRule, srcItem) } logs, sub, err := _Wmatic.contract.FilterLogs(opts, "Withdrawal", srcRule) if err != nil { return nil, err } return &WmaticWithdrawalIterator{contract: _Wmatic.contract, event: "Withdrawal", logs: logs, sub: sub}, nil } // WatchWithdrawal is a free log subscription operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. // // Solidity: event Withdrawal(address indexed src, uint256 wad) func (_Wmatic *WmaticFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WmaticWithdrawal, src []common.Address) (event.Subscription, error) { var srcRule []interface{} for _, srcItem := range src { srcRule = append(srcRule, srcItem) } logs, sub, err := _Wmatic.contract.WatchLogs(opts, "Withdrawal", srcRule) if err != nil { return nil, err } return event.NewSubscription(func(quit <-chan struct{}) error { defer sub.Unsubscribe() for { select { case log := <-logs: // New log arrived, parse the event and forward to the user event := new(WmaticWithdrawal) if err := _Wmatic.contract.UnpackLog(event, "Withdrawal", log); err != nil { return err } event.Raw = log select { case sink <- event: case err := <-sub.Err(): return err case <-quit: return nil } case err := <-sub.Err(): return err case <-quit: return nil } } }), nil } // ParseWithdrawal is a log parse operation binding the contract event 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65. // // Solidity: event Withdrawal(address indexed src, uint256 wad) func (_Wmatic *WmaticFilterer) ParseWithdrawal(log types.Log) (*WmaticWithdrawal, error) { event := new(WmaticWithdrawal) if err := _Wmatic.contract.UnpackLog(event, "Withdrawal", log); err != nil { return nil, err } event.Raw = log return event, nil }