1091 lines
40 KiB
Go
1091 lines
40 KiB
Go
|
// Code generated - DO NOT EDIT.
|
||
|
// This file is a generated binding and any manual changes will be lost.
|
||
|
|
||
|
package contracts
|
||
|
|
||
|
import (
|
||
|
"errors"
|
||
|
"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 (
|
||
|
_ = errors.New
|
||
|
_ = big.NewInt
|
||
|
_ = strings.NewReader
|
||
|
_ = ethereum.NotFound
|
||
|
_ = bind.Bind
|
||
|
_ = common.Big1
|
||
|
_ = types.BloomLookup
|
||
|
_ = event.NewSubscription
|
||
|
)
|
||
|
|
||
|
// WBnbMetaData contains all meta data concerning the WBnb contract.
|
||
|
var WBnbMetaData = &bind.MetaData{
|
||
|
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\"}]",
|
||
|
}
|
||
|
|
||
|
// WBnbABI is the input ABI used to generate the binding from.
|
||
|
// Deprecated: Use WBnbMetaData.ABI instead.
|
||
|
var WBnbABI = WBnbMetaData.ABI
|
||
|
|
||
|
// WBnb is an auto generated Go binding around an Ethereum contract.
|
||
|
type WBnb struct {
|
||
|
WBnbCaller // Read-only binding to the contract
|
||
|
WBnbTransactor // Write-only binding to the contract
|
||
|
WBnbFilterer // Log filterer for contract events
|
||
|
}
|
||
|
|
||
|
// WBnbCaller is an auto generated read-only Go binding around an Ethereum contract.
|
||
|
type WBnbCaller struct {
|
||
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||
|
}
|
||
|
|
||
|
// WBnbTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
||
|
type WBnbTransactor struct {
|
||
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||
|
}
|
||
|
|
||
|
// WBnbFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
||
|
type WBnbFilterer struct {
|
||
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
||
|
}
|
||
|
|
||
|
// WBnbSession is an auto generated Go binding around an Ethereum contract,
|
||
|
// with pre-set call and transact options.
|
||
|
type WBnbSession struct {
|
||
|
Contract *WBnb // 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
|
||
|
}
|
||
|
|
||
|
// WBnbCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
||
|
// with pre-set call options.
|
||
|
type WBnbCallerSession struct {
|
||
|
Contract *WBnbCaller // Generic contract caller binding to set the session for
|
||
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
||
|
}
|
||
|
|
||
|
// WBnbTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
||
|
// with pre-set transact options.
|
||
|
type WBnbTransactorSession struct {
|
||
|
Contract *WBnbTransactor // Generic contract transactor binding to set the session for
|
||
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
||
|
}
|
||
|
|
||
|
// WBnbRaw is an auto generated low-level Go binding around an Ethereum contract.
|
||
|
type WBnbRaw struct {
|
||
|
Contract *WBnb // Generic contract binding to access the raw methods on
|
||
|
}
|
||
|
|
||
|
// WBnbCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
||
|
type WBnbCallerRaw struct {
|
||
|
Contract *WBnbCaller // Generic read-only contract binding to access the raw methods on
|
||
|
}
|
||
|
|
||
|
// WBnbTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
||
|
type WBnbTransactorRaw struct {
|
||
|
Contract *WBnbTransactor // Generic write-only contract binding to access the raw methods on
|
||
|
}
|
||
|
|
||
|
// NewWBnb creates a new instance of WBnb, bound to a specific deployed contract.
|
||
|
func NewWBnb(address common.Address, backend bind.ContractBackend) (*WBnb, error) {
|
||
|
contract, err := bindWBnb(address, backend, backend, backend)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnb{WBnbCaller: WBnbCaller{contract: contract}, WBnbTransactor: WBnbTransactor{contract: contract}, WBnbFilterer: WBnbFilterer{contract: contract}}, nil
|
||
|
}
|
||
|
|
||
|
// NewWBnbCaller creates a new read-only instance of WBnb, bound to a specific deployed contract.
|
||
|
func NewWBnbCaller(address common.Address, caller bind.ContractCaller) (*WBnbCaller, error) {
|
||
|
contract, err := bindWBnb(address, caller, nil, nil)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbCaller{contract: contract}, nil
|
||
|
}
|
||
|
|
||
|
// NewWBnbTransactor creates a new write-only instance of WBnb, bound to a specific deployed contract.
|
||
|
func NewWBnbTransactor(address common.Address, transactor bind.ContractTransactor) (*WBnbTransactor, error) {
|
||
|
contract, err := bindWBnb(address, nil, transactor, nil)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbTransactor{contract: contract}, nil
|
||
|
}
|
||
|
|
||
|
// NewWBnbFilterer creates a new log filterer instance of WBnb, bound to a specific deployed contract.
|
||
|
func NewWBnbFilterer(address common.Address, filterer bind.ContractFilterer) (*WBnbFilterer, error) {
|
||
|
contract, err := bindWBnb(address, nil, nil, filterer)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbFilterer{contract: contract}, nil
|
||
|
}
|
||
|
|
||
|
// bindWBnb binds a generic wrapper to an already deployed contract.
|
||
|
func bindWBnb(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
||
|
parsed, err := abi.JSON(strings.NewReader(WBnbABI))
|
||
|
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 (_WBnb *WBnbRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||
|
return _WBnb.Contract.WBnbCaller.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 (_WBnb *WBnbRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.WBnbTransactor.contract.Transfer(opts)
|
||
|
}
|
||
|
|
||
|
// Transact invokes the (paid) contract method with params as input values.
|
||
|
func (_WBnb *WBnbRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.WBnbTransactor.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 (_WBnb *WBnbCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
||
|
return _WBnb.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 (_WBnb *WBnbTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.contract.Transfer(opts)
|
||
|
}
|
||
|
|
||
|
// Transact invokes the (paid) contract method with params as input values.
|
||
|
func (_WBnb *WBnbTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
||
|
return _WBnb.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 (_WBnb *WBnbCaller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) {
|
||
|
var out []interface{}
|
||
|
err := _WBnb.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 (_WBnb *WBnbSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) {
|
||
|
return _WBnb.Contract.Allowance(&_WBnb.CallOpts, arg0, arg1)
|
||
|
}
|
||
|
|
||
|
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
||
|
//
|
||
|
// Solidity: function allowance(address , address ) view returns(uint256)
|
||
|
func (_WBnb *WBnbCallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) {
|
||
|
return _WBnb.Contract.Allowance(&_WBnb.CallOpts, arg0, arg1)
|
||
|
}
|
||
|
|
||
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
||
|
//
|
||
|
// Solidity: function balanceOf(address ) view returns(uint256)
|
||
|
func (_WBnb *WBnbCaller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
|
||
|
var out []interface{}
|
||
|
err := _WBnb.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 (_WBnb *WBnbSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
|
||
|
return _WBnb.Contract.BalanceOf(&_WBnb.CallOpts, arg0)
|
||
|
}
|
||
|
|
||
|
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
||
|
//
|
||
|
// Solidity: function balanceOf(address ) view returns(uint256)
|
||
|
func (_WBnb *WBnbCallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) {
|
||
|
return _WBnb.Contract.BalanceOf(&_WBnb.CallOpts, arg0)
|
||
|
}
|
||
|
|
||
|
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
||
|
//
|
||
|
// Solidity: function decimals() view returns(uint8)
|
||
|
func (_WBnb *WBnbCaller) Decimals(opts *bind.CallOpts) (uint8, error) {
|
||
|
var out []interface{}
|
||
|
err := _WBnb.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 (_WBnb *WBnbSession) Decimals() (uint8, error) {
|
||
|
return _WBnb.Contract.Decimals(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
||
|
//
|
||
|
// Solidity: function decimals() view returns(uint8)
|
||
|
func (_WBnb *WBnbCallerSession) Decimals() (uint8, error) {
|
||
|
return _WBnb.Contract.Decimals(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
||
|
//
|
||
|
// Solidity: function name() view returns(string)
|
||
|
func (_WBnb *WBnbCaller) Name(opts *bind.CallOpts) (string, error) {
|
||
|
var out []interface{}
|
||
|
err := _WBnb.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 (_WBnb *WBnbSession) Name() (string, error) {
|
||
|
return _WBnb.Contract.Name(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
||
|
//
|
||
|
// Solidity: function name() view returns(string)
|
||
|
func (_WBnb *WBnbCallerSession) Name() (string, error) {
|
||
|
return _WBnb.Contract.Name(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
||
|
//
|
||
|
// Solidity: function symbol() view returns(string)
|
||
|
func (_WBnb *WBnbCaller) Symbol(opts *bind.CallOpts) (string, error) {
|
||
|
var out []interface{}
|
||
|
err := _WBnb.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 (_WBnb *WBnbSession) Symbol() (string, error) {
|
||
|
return _WBnb.Contract.Symbol(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
||
|
//
|
||
|
// Solidity: function symbol() view returns(string)
|
||
|
func (_WBnb *WBnbCallerSession) Symbol() (string, error) {
|
||
|
return _WBnb.Contract.Symbol(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
||
|
//
|
||
|
// Solidity: function totalSupply() view returns(uint256)
|
||
|
func (_WBnb *WBnbCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) {
|
||
|
var out []interface{}
|
||
|
err := _WBnb.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 (_WBnb *WBnbSession) TotalSupply() (*big.Int, error) {
|
||
|
return _WBnb.Contract.TotalSupply(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd.
|
||
|
//
|
||
|
// Solidity: function totalSupply() view returns(uint256)
|
||
|
func (_WBnb *WBnbCallerSession) TotalSupply() (*big.Int, error) {
|
||
|
return _WBnb.Contract.TotalSupply(&_WBnb.CallOpts)
|
||
|
}
|
||
|
|
||
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
||
|
//
|
||
|
// Solidity: function approve(address guy, uint256 wad) returns(bool)
|
||
|
func (_WBnb *WBnbTransactor) Approve(opts *bind.TransactOpts, guy common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.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 (_WBnb *WBnbSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Approve(&_WBnb.TransactOpts, guy, wad)
|
||
|
}
|
||
|
|
||
|
// Approve is a paid mutator transaction binding the contract method 0x095ea7b3.
|
||
|
//
|
||
|
// Solidity: function approve(address guy, uint256 wad) returns(bool)
|
||
|
func (_WBnb *WBnbTransactorSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Approve(&_WBnb.TransactOpts, guy, wad)
|
||
|
}
|
||
|
|
||
|
// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0.
|
||
|
//
|
||
|
// Solidity: function deposit() payable returns()
|
||
|
func (_WBnb *WBnbTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) {
|
||
|
return _WBnb.contract.Transact(opts, "deposit")
|
||
|
}
|
||
|
|
||
|
// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0.
|
||
|
//
|
||
|
// Solidity: function deposit() payable returns()
|
||
|
func (_WBnb *WBnbSession) Deposit() (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Deposit(&_WBnb.TransactOpts)
|
||
|
}
|
||
|
|
||
|
// Deposit is a paid mutator transaction binding the contract method 0xd0e30db0.
|
||
|
//
|
||
|
// Solidity: function deposit() payable returns()
|
||
|
func (_WBnb *WBnbTransactorSession) Deposit() (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Deposit(&_WBnb.TransactOpts)
|
||
|
}
|
||
|
|
||
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
||
|
//
|
||
|
// Solidity: function transfer(address dst, uint256 wad) returns(bool)
|
||
|
func (_WBnb *WBnbTransactor) Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.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 (_WBnb *WBnbSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Transfer(&_WBnb.TransactOpts, dst, wad)
|
||
|
}
|
||
|
|
||
|
// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb.
|
||
|
//
|
||
|
// Solidity: function transfer(address dst, uint256 wad) returns(bool)
|
||
|
func (_WBnb *WBnbTransactorSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Transfer(&_WBnb.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 (_WBnb *WBnbTransactor) TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.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 (_WBnb *WBnbSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.TransferFrom(&_WBnb.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 (_WBnb *WBnbTransactorSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.TransferFrom(&_WBnb.TransactOpts, src, dst, wad)
|
||
|
}
|
||
|
|
||
|
// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
|
||
|
//
|
||
|
// Solidity: function withdraw(uint256 wad) returns()
|
||
|
func (_WBnb *WBnbTransactor) Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.contract.Transact(opts, "withdraw", wad)
|
||
|
}
|
||
|
|
||
|
// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
|
||
|
//
|
||
|
// Solidity: function withdraw(uint256 wad) returns()
|
||
|
func (_WBnb *WBnbSession) Withdraw(wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Withdraw(&_WBnb.TransactOpts, wad)
|
||
|
}
|
||
|
|
||
|
// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
|
||
|
//
|
||
|
// Solidity: function withdraw(uint256 wad) returns()
|
||
|
func (_WBnb *WBnbTransactorSession) Withdraw(wad *big.Int) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Withdraw(&_WBnb.TransactOpts, wad)
|
||
|
}
|
||
|
|
||
|
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||
|
//
|
||
|
// Solidity: fallback() payable returns()
|
||
|
func (_WBnb *WBnbTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) {
|
||
|
return _WBnb.contract.RawTransact(opts, calldata)
|
||
|
}
|
||
|
|
||
|
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||
|
//
|
||
|
// Solidity: fallback() payable returns()
|
||
|
func (_WBnb *WBnbSession) Fallback(calldata []byte) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Fallback(&_WBnb.TransactOpts, calldata)
|
||
|
}
|
||
|
|
||
|
// Fallback is a paid mutator transaction binding the contract fallback function.
|
||
|
//
|
||
|
// Solidity: fallback() payable returns()
|
||
|
func (_WBnb *WBnbTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) {
|
||
|
return _WBnb.Contract.Fallback(&_WBnb.TransactOpts, calldata)
|
||
|
}
|
||
|
|
||
|
// WBnbApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the WBnb contract.
|
||
|
type WBnbApprovalIterator struct {
|
||
|
Event *WBnbApproval // 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 *WBnbApprovalIterator) 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(WBnbApproval)
|
||
|
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(WBnbApproval)
|
||
|
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 *WBnbApprovalIterator) Error() error {
|
||
|
return it.fail
|
||
|
}
|
||
|
|
||
|
// Close terminates the iteration process, releasing any pending underlying
|
||
|
// resources.
|
||
|
func (it *WBnbApprovalIterator) Close() error {
|
||
|
it.sub.Unsubscribe()
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// WBnbApproval represents a Approval event raised by the WBnb contract.
|
||
|
type WBnbApproval 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 (_WBnb *WBnbFilterer) FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*WBnbApprovalIterator, 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 := _WBnb.contract.FilterLogs(opts, "Approval", srcRule, guyRule)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbApprovalIterator{contract: _WBnb.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 (_WBnb *WBnbFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WBnbApproval, 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 := _WBnb.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(WBnbApproval)
|
||
|
if err := _WBnb.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 (_WBnb *WBnbFilterer) ParseApproval(log types.Log) (*WBnbApproval, error) {
|
||
|
event := new(WBnbApproval)
|
||
|
if err := _WBnb.contract.UnpackLog(event, "Approval", log); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
event.Raw = log
|
||
|
return event, nil
|
||
|
}
|
||
|
|
||
|
// WBnbDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the WBnb contract.
|
||
|
type WBnbDepositIterator struct {
|
||
|
Event *WBnbDeposit // 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 *WBnbDepositIterator) 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(WBnbDeposit)
|
||
|
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(WBnbDeposit)
|
||
|
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 *WBnbDepositIterator) Error() error {
|
||
|
return it.fail
|
||
|
}
|
||
|
|
||
|
// Close terminates the iteration process, releasing any pending underlying
|
||
|
// resources.
|
||
|
func (it *WBnbDepositIterator) Close() error {
|
||
|
it.sub.Unsubscribe()
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// WBnbDeposit represents a Deposit event raised by the WBnb contract.
|
||
|
type WBnbDeposit 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 (_WBnb *WBnbFilterer) FilterDeposit(opts *bind.FilterOpts, dst []common.Address) (*WBnbDepositIterator, error) {
|
||
|
|
||
|
var dstRule []interface{}
|
||
|
for _, dstItem := range dst {
|
||
|
dstRule = append(dstRule, dstItem)
|
||
|
}
|
||
|
|
||
|
logs, sub, err := _WBnb.contract.FilterLogs(opts, "Deposit", dstRule)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbDepositIterator{contract: _WBnb.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 (_WBnb *WBnbFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WBnbDeposit, dst []common.Address) (event.Subscription, error) {
|
||
|
|
||
|
var dstRule []interface{}
|
||
|
for _, dstItem := range dst {
|
||
|
dstRule = append(dstRule, dstItem)
|
||
|
}
|
||
|
|
||
|
logs, sub, err := _WBnb.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(WBnbDeposit)
|
||
|
if err := _WBnb.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 (_WBnb *WBnbFilterer) ParseDeposit(log types.Log) (*WBnbDeposit, error) {
|
||
|
event := new(WBnbDeposit)
|
||
|
if err := _WBnb.contract.UnpackLog(event, "Deposit", log); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
event.Raw = log
|
||
|
return event, nil
|
||
|
}
|
||
|
|
||
|
// WBnbTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the WBnb contract.
|
||
|
type WBnbTransferIterator struct {
|
||
|
Event *WBnbTransfer // 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 *WBnbTransferIterator) 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(WBnbTransfer)
|
||
|
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(WBnbTransfer)
|
||
|
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 *WBnbTransferIterator) Error() error {
|
||
|
return it.fail
|
||
|
}
|
||
|
|
||
|
// Close terminates the iteration process, releasing any pending underlying
|
||
|
// resources.
|
||
|
func (it *WBnbTransferIterator) Close() error {
|
||
|
it.sub.Unsubscribe()
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// WBnbTransfer represents a Transfer event raised by the WBnb contract.
|
||
|
type WBnbTransfer 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 (_WBnb *WBnbFilterer) FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*WBnbTransferIterator, 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 := _WBnb.contract.FilterLogs(opts, "Transfer", srcRule, dstRule)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbTransferIterator{contract: _WBnb.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 (_WBnb *WBnbFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WBnbTransfer, 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 := _WBnb.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(WBnbTransfer)
|
||
|
if err := _WBnb.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 (_WBnb *WBnbFilterer) ParseTransfer(log types.Log) (*WBnbTransfer, error) {
|
||
|
event := new(WBnbTransfer)
|
||
|
if err := _WBnb.contract.UnpackLog(event, "Transfer", log); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
event.Raw = log
|
||
|
return event, nil
|
||
|
}
|
||
|
|
||
|
// WBnbWithdrawalIterator is returned from FilterWithdrawal and is used to iterate over the raw logs and unpacked data for Withdrawal events raised by the WBnb contract.
|
||
|
type WBnbWithdrawalIterator struct {
|
||
|
Event *WBnbWithdrawal // 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 *WBnbWithdrawalIterator) 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(WBnbWithdrawal)
|
||
|
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(WBnbWithdrawal)
|
||
|
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 *WBnbWithdrawalIterator) Error() error {
|
||
|
return it.fail
|
||
|
}
|
||
|
|
||
|
// Close terminates the iteration process, releasing any pending underlying
|
||
|
// resources.
|
||
|
func (it *WBnbWithdrawalIterator) Close() error {
|
||
|
it.sub.Unsubscribe()
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// WBnbWithdrawal represents a Withdrawal event raised by the WBnb contract.
|
||
|
type WBnbWithdrawal 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 (_WBnb *WBnbFilterer) FilterWithdrawal(opts *bind.FilterOpts, src []common.Address) (*WBnbWithdrawalIterator, error) {
|
||
|
|
||
|
var srcRule []interface{}
|
||
|
for _, srcItem := range src {
|
||
|
srcRule = append(srcRule, srcItem)
|
||
|
}
|
||
|
|
||
|
logs, sub, err := _WBnb.contract.FilterLogs(opts, "Withdrawal", srcRule)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &WBnbWithdrawalIterator{contract: _WBnb.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 (_WBnb *WBnbFilterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WBnbWithdrawal, src []common.Address) (event.Subscription, error) {
|
||
|
|
||
|
var srcRule []interface{}
|
||
|
for _, srcItem := range src {
|
||
|
srcRule = append(srcRule, srcItem)
|
||
|
}
|
||
|
|
||
|
logs, sub, err := _WBnb.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(WBnbWithdrawal)
|
||
|
if err := _WBnb.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 (_WBnb *WBnbFilterer) ParseWithdrawal(log types.Log) (*WBnbWithdrawal, error) {
|
||
|
event := new(WBnbWithdrawal)
|
||
|
if err := _WBnb.contract.UnpackLog(event, "Withdrawal", log); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
event.Raw = log
|
||
|
return event, nil
|
||
|
}
|