github.com/cwntr/go-defi@v0.0.0-20210629134751-07f9ec2f7e66/binding/aave/lendingpool/lendingpool.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 lendingpool
     5  
     6  import (
     7  	"math/big"
     8  	"strings"
     9  
    10  	ethereum "github.com/ethereum/go-ethereum"
    11  	"github.com/ethereum/go-ethereum/accounts/abi"
    12  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    13  	"github.com/ethereum/go-ethereum/common"
    14  	"github.com/ethereum/go-ethereum/core/types"
    15  	"github.com/ethereum/go-ethereum/event"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var (
    20  	_ = big.NewInt
    21  	_ = strings.NewReader
    22  	_ = ethereum.NotFound
    23  	_ = bind.Bind
    24  	_ = common.Big1
    25  	_ = types.BloomLookup
    26  	_ = event.NewSubscription
    27  )
    28  
    29  // LendingpoolABI is the input ABI used to generate the binding from.
    30  const LendingpoolABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_borrowRateMode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_borrowRate\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_originationFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_borrowBalanceIncrease\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_referral\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_referral\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_protocolFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"FlashLoan\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_collateral\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_purchaseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_liquidatedCollateralAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_accruedBorrowInterest\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_receiveAToken\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"LiquidationCall\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_collateral\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_feeLiquidated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_liquidatedCollateralForFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"OriginationFeeLiquidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newStableRate\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_borrowBalanceIncrease\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"RebalanceStableBorrowRate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"RedeemUnderlying\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_repayer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amountMinusFees\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fees\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_borrowBalanceIncrease\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Repay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"ReserveUsedAsCollateralDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"ReserveUsedAsCollateralEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newRateMode\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newRate\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_borrowBalanceIncrease\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"LENDINGPOOL_REVISION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"UINT_MAX_VALUE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"addressesProvider\",\"outputs\":[{\"internalType\":\"contractLendingPoolAddressesProvider\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"core\",\"outputs\":[{\"internalType\":\"contractLendingPoolCore\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"dataProvider\",\"outputs\":[{\"internalType\":\"contractLendingPoolDataProvider\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"parametersProvider\",\"outputs\":[{\"internalType\":\"contractLendingPoolParametersProvider\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractLendingPoolAddressesProvider\",\"name\":\"_addressesProvider\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_referralCode\",\"type\":\"uint16\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_aTokenBalanceAfterRedeem\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interestRateMode\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"_referralCode\",\"type\":\"uint16\"}],\"name\":\"borrow\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"addresspayable\",\"name\":\"_onBehalfOf\",\"type\":\"address\"}],\"name\":\"repay\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"}],\"name\":\"swapBorrowRateMode\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"rebalanceStableBorrowRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_useAsCollateral\",\"type\":\"bool\"}],\"name\":\"setUserUseReserveAsCollateral\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collateral\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_purchaseAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_receiveAToken\",\"type\":\"bool\"}],\"name\":\"liquidationCall\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_params\",\"type\":\"bytes\"}],\"name\":\"flashLoan\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"}],\"name\":\"getReserveConfigurationData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ltv\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationBonus\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"interestRateStrategyAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"usageAsCollateralEnabled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"borrowingEnabled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"stableBorrowRateEnabled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"}],\"name\":\"getReserveData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"availableLiquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBorrowsStable\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBorrowsVariable\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidityRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"variableBorrowRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stableBorrowRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"averageStableBorrowRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"utilizationRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidityIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"variableBorrowIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"aTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint40\",\"name\":\"lastUpdateTimestamp\",\"type\":\"uint40\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getUserAccountData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalLiquidityETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCollateralETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBorrowsETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeesETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"availableBorrowsETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentLiquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ltv\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthFactor\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getUserReserveData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"currentATokenBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentBorrowBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"principalBorrowBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowRateMode\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidityRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"originationFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"variableBorrowIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdateTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"usageAsCollateralEnabled\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getReserves\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"
    31  
    32  // Lendingpool is an auto generated Go binding around an Ethereum contract.
    33  type Lendingpool struct {
    34  	LendingpoolCaller     // Read-only binding to the contract
    35  	LendingpoolTransactor // Write-only binding to the contract
    36  	LendingpoolFilterer   // Log filterer for contract events
    37  }
    38  
    39  // LendingpoolCaller is an auto generated read-only Go binding around an Ethereum contract.
    40  type LendingpoolCaller struct {
    41  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    42  }
    43  
    44  // LendingpoolTransactor is an auto generated write-only Go binding around an Ethereum contract.
    45  type LendingpoolTransactor struct {
    46  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    47  }
    48  
    49  // LendingpoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    50  type LendingpoolFilterer struct {
    51  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    52  }
    53  
    54  // LendingpoolSession is an auto generated Go binding around an Ethereum contract,
    55  // with pre-set call and transact options.
    56  type LendingpoolSession struct {
    57  	Contract     *Lendingpool      // Generic contract binding to set the session for
    58  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    59  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    60  }
    61  
    62  // LendingpoolCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    63  // with pre-set call options.
    64  type LendingpoolCallerSession struct {
    65  	Contract *LendingpoolCaller // Generic contract caller binding to set the session for
    66  	CallOpts bind.CallOpts      // Call options to use throughout this session
    67  }
    68  
    69  // LendingpoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    70  // with pre-set transact options.
    71  type LendingpoolTransactorSession struct {
    72  	Contract     *LendingpoolTransactor // Generic contract transactor binding to set the session for
    73  	TransactOpts bind.TransactOpts      // Transaction auth options to use throughout this session
    74  }
    75  
    76  // LendingpoolRaw is an auto generated low-level Go binding around an Ethereum contract.
    77  type LendingpoolRaw struct {
    78  	Contract *Lendingpool // Generic contract binding to access the raw methods on
    79  }
    80  
    81  // LendingpoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    82  type LendingpoolCallerRaw struct {
    83  	Contract *LendingpoolCaller // Generic read-only contract binding to access the raw methods on
    84  }
    85  
    86  // LendingpoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    87  type LendingpoolTransactorRaw struct {
    88  	Contract *LendingpoolTransactor // Generic write-only contract binding to access the raw methods on
    89  }
    90  
    91  // NewLendingpool creates a new instance of Lendingpool, bound to a specific deployed contract.
    92  func NewLendingpool(address common.Address, backend bind.ContractBackend) (*Lendingpool, error) {
    93  	contract, err := bindLendingpool(address, backend, backend, backend)
    94  	if err != nil {
    95  		return nil, err
    96  	}
    97  	return &Lendingpool{LendingpoolCaller: LendingpoolCaller{contract: contract}, LendingpoolTransactor: LendingpoolTransactor{contract: contract}, LendingpoolFilterer: LendingpoolFilterer{contract: contract}}, nil
    98  }
    99  
   100  // NewLendingpoolCaller creates a new read-only instance of Lendingpool, bound to a specific deployed contract.
   101  func NewLendingpoolCaller(address common.Address, caller bind.ContractCaller) (*LendingpoolCaller, error) {
   102  	contract, err := bindLendingpool(address, caller, nil, nil)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return &LendingpoolCaller{contract: contract}, nil
   107  }
   108  
   109  // NewLendingpoolTransactor creates a new write-only instance of Lendingpool, bound to a specific deployed contract.
   110  func NewLendingpoolTransactor(address common.Address, transactor bind.ContractTransactor) (*LendingpoolTransactor, error) {
   111  	contract, err := bindLendingpool(address, nil, transactor, nil)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	return &LendingpoolTransactor{contract: contract}, nil
   116  }
   117  
   118  // NewLendingpoolFilterer creates a new log filterer instance of Lendingpool, bound to a specific deployed contract.
   119  func NewLendingpoolFilterer(address common.Address, filterer bind.ContractFilterer) (*LendingpoolFilterer, error) {
   120  	contract, err := bindLendingpool(address, nil, nil, filterer)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	return &LendingpoolFilterer{contract: contract}, nil
   125  }
   126  
   127  // bindLendingpool binds a generic wrapper to an already deployed contract.
   128  func bindLendingpool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   129  	parsed, err := abi.JSON(strings.NewReader(LendingpoolABI))
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   134  }
   135  
   136  // Call invokes the (constant) contract method with params as input values and
   137  // sets the output to result. The result type might be a single field for simple
   138  // returns, a slice of interfaces for anonymous returns and a struct for named
   139  // returns.
   140  func (_Lendingpool *LendingpoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   141  	return _Lendingpool.Contract.LendingpoolCaller.contract.Call(opts, result, method, params...)
   142  }
   143  
   144  // Transfer initiates a plain transaction to move funds to the contract, calling
   145  // its default method if one is available.
   146  func (_Lendingpool *LendingpoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   147  	return _Lendingpool.Contract.LendingpoolTransactor.contract.Transfer(opts)
   148  }
   149  
   150  // Transact invokes the (paid) contract method with params as input values.
   151  func (_Lendingpool *LendingpoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   152  	return _Lendingpool.Contract.LendingpoolTransactor.contract.Transact(opts, method, params...)
   153  }
   154  
   155  // Call invokes the (constant) contract method with params as input values and
   156  // sets the output to result. The result type might be a single field for simple
   157  // returns, a slice of interfaces for anonymous returns and a struct for named
   158  // returns.
   159  func (_Lendingpool *LendingpoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   160  	return _Lendingpool.Contract.contract.Call(opts, result, method, params...)
   161  }
   162  
   163  // Transfer initiates a plain transaction to move funds to the contract, calling
   164  // its default method if one is available.
   165  func (_Lendingpool *LendingpoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   166  	return _Lendingpool.Contract.contract.Transfer(opts)
   167  }
   168  
   169  // Transact invokes the (paid) contract method with params as input values.
   170  func (_Lendingpool *LendingpoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   171  	return _Lendingpool.Contract.contract.Transact(opts, method, params...)
   172  }
   173  
   174  // LENDINGPOOLREVISION is a free data retrieval call binding the contract method 0x8afaff02.
   175  //
   176  // Solidity: function LENDINGPOOL_REVISION() view returns(uint256)
   177  func (_Lendingpool *LendingpoolCaller) LENDINGPOOLREVISION(opts *bind.CallOpts) (*big.Int, error) {
   178  	var out []interface{}
   179  	err := _Lendingpool.contract.Call(opts, &out, "LENDINGPOOL_REVISION")
   180  
   181  	if err != nil {
   182  		return *new(*big.Int), err
   183  	}
   184  
   185  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   186  
   187  	return out0, err
   188  
   189  }
   190  
   191  // LENDINGPOOLREVISION is a free data retrieval call binding the contract method 0x8afaff02.
   192  //
   193  // Solidity: function LENDINGPOOL_REVISION() view returns(uint256)
   194  func (_Lendingpool *LendingpoolSession) LENDINGPOOLREVISION() (*big.Int, error) {
   195  	return _Lendingpool.Contract.LENDINGPOOLREVISION(&_Lendingpool.CallOpts)
   196  }
   197  
   198  // LENDINGPOOLREVISION is a free data retrieval call binding the contract method 0x8afaff02.
   199  //
   200  // Solidity: function LENDINGPOOL_REVISION() view returns(uint256)
   201  func (_Lendingpool *LendingpoolCallerSession) LENDINGPOOLREVISION() (*big.Int, error) {
   202  	return _Lendingpool.Contract.LENDINGPOOLREVISION(&_Lendingpool.CallOpts)
   203  }
   204  
   205  // UINTMAXVALUE is a free data retrieval call binding the contract method 0xd0fc81d2.
   206  //
   207  // Solidity: function UINT_MAX_VALUE() view returns(uint256)
   208  func (_Lendingpool *LendingpoolCaller) UINTMAXVALUE(opts *bind.CallOpts) (*big.Int, error) {
   209  	var out []interface{}
   210  	err := _Lendingpool.contract.Call(opts, &out, "UINT_MAX_VALUE")
   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  // UINTMAXVALUE is a free data retrieval call binding the contract method 0xd0fc81d2.
   223  //
   224  // Solidity: function UINT_MAX_VALUE() view returns(uint256)
   225  func (_Lendingpool *LendingpoolSession) UINTMAXVALUE() (*big.Int, error) {
   226  	return _Lendingpool.Contract.UINTMAXVALUE(&_Lendingpool.CallOpts)
   227  }
   228  
   229  // UINTMAXVALUE is a free data retrieval call binding the contract method 0xd0fc81d2.
   230  //
   231  // Solidity: function UINT_MAX_VALUE() view returns(uint256)
   232  func (_Lendingpool *LendingpoolCallerSession) UINTMAXVALUE() (*big.Int, error) {
   233  	return _Lendingpool.Contract.UINTMAXVALUE(&_Lendingpool.CallOpts)
   234  }
   235  
   236  // AddressesProvider is a free data retrieval call binding the contract method 0xc72c4d10.
   237  //
   238  // Solidity: function addressesProvider() view returns(address)
   239  func (_Lendingpool *LendingpoolCaller) AddressesProvider(opts *bind.CallOpts) (common.Address, error) {
   240  	var out []interface{}
   241  	err := _Lendingpool.contract.Call(opts, &out, "addressesProvider")
   242  
   243  	if err != nil {
   244  		return *new(common.Address), err
   245  	}
   246  
   247  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   248  
   249  	return out0, err
   250  
   251  }
   252  
   253  // AddressesProvider is a free data retrieval call binding the contract method 0xc72c4d10.
   254  //
   255  // Solidity: function addressesProvider() view returns(address)
   256  func (_Lendingpool *LendingpoolSession) AddressesProvider() (common.Address, error) {
   257  	return _Lendingpool.Contract.AddressesProvider(&_Lendingpool.CallOpts)
   258  }
   259  
   260  // AddressesProvider is a free data retrieval call binding the contract method 0xc72c4d10.
   261  //
   262  // Solidity: function addressesProvider() view returns(address)
   263  func (_Lendingpool *LendingpoolCallerSession) AddressesProvider() (common.Address, error) {
   264  	return _Lendingpool.Contract.AddressesProvider(&_Lendingpool.CallOpts)
   265  }
   266  
   267  // Core is a free data retrieval call binding the contract method 0xf2f4eb26.
   268  //
   269  // Solidity: function core() view returns(address)
   270  func (_Lendingpool *LendingpoolCaller) Core(opts *bind.CallOpts) (common.Address, error) {
   271  	var out []interface{}
   272  	err := _Lendingpool.contract.Call(opts, &out, "core")
   273  
   274  	if err != nil {
   275  		return *new(common.Address), err
   276  	}
   277  
   278  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   279  
   280  	return out0, err
   281  
   282  }
   283  
   284  // Core is a free data retrieval call binding the contract method 0xf2f4eb26.
   285  //
   286  // Solidity: function core() view returns(address)
   287  func (_Lendingpool *LendingpoolSession) Core() (common.Address, error) {
   288  	return _Lendingpool.Contract.Core(&_Lendingpool.CallOpts)
   289  }
   290  
   291  // Core is a free data retrieval call binding the contract method 0xf2f4eb26.
   292  //
   293  // Solidity: function core() view returns(address)
   294  func (_Lendingpool *LendingpoolCallerSession) Core() (common.Address, error) {
   295  	return _Lendingpool.Contract.Core(&_Lendingpool.CallOpts)
   296  }
   297  
   298  // DataProvider is a free data retrieval call binding the contract method 0xb334ed86.
   299  //
   300  // Solidity: function dataProvider() view returns(address)
   301  func (_Lendingpool *LendingpoolCaller) DataProvider(opts *bind.CallOpts) (common.Address, error) {
   302  	var out []interface{}
   303  	err := _Lendingpool.contract.Call(opts, &out, "dataProvider")
   304  
   305  	if err != nil {
   306  		return *new(common.Address), err
   307  	}
   308  
   309  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   310  
   311  	return out0, err
   312  
   313  }
   314  
   315  // DataProvider is a free data retrieval call binding the contract method 0xb334ed86.
   316  //
   317  // Solidity: function dataProvider() view returns(address)
   318  func (_Lendingpool *LendingpoolSession) DataProvider() (common.Address, error) {
   319  	return _Lendingpool.Contract.DataProvider(&_Lendingpool.CallOpts)
   320  }
   321  
   322  // DataProvider is a free data retrieval call binding the contract method 0xb334ed86.
   323  //
   324  // Solidity: function dataProvider() view returns(address)
   325  func (_Lendingpool *LendingpoolCallerSession) DataProvider() (common.Address, error) {
   326  	return _Lendingpool.Contract.DataProvider(&_Lendingpool.CallOpts)
   327  }
   328  
   329  // GetReserveConfigurationData is a free data retrieval call binding the contract method 0x3e150141.
   330  //
   331  // Solidity: function getReserveConfigurationData(address _reserve) view returns(uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, address interestRateStrategyAddress, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive)
   332  func (_Lendingpool *LendingpoolCaller) GetReserveConfigurationData(opts *bind.CallOpts, _reserve common.Address) (struct {
   333  	Ltv                         *big.Int
   334  	LiquidationThreshold        *big.Int
   335  	LiquidationBonus            *big.Int
   336  	InterestRateStrategyAddress common.Address
   337  	UsageAsCollateralEnabled    bool
   338  	BorrowingEnabled            bool
   339  	StableBorrowRateEnabled     bool
   340  	IsActive                    bool
   341  }, error) {
   342  	var out []interface{}
   343  	err := _Lendingpool.contract.Call(opts, &out, "getReserveConfigurationData", _reserve)
   344  
   345  	outstruct := new(struct {
   346  		Ltv                         *big.Int
   347  		LiquidationThreshold        *big.Int
   348  		LiquidationBonus            *big.Int
   349  		InterestRateStrategyAddress common.Address
   350  		UsageAsCollateralEnabled    bool
   351  		BorrowingEnabled            bool
   352  		StableBorrowRateEnabled     bool
   353  		IsActive                    bool
   354  	})
   355  
   356  	outstruct.Ltv = out[0].(*big.Int)
   357  	outstruct.LiquidationThreshold = out[1].(*big.Int)
   358  	outstruct.LiquidationBonus = out[2].(*big.Int)
   359  	outstruct.InterestRateStrategyAddress = out[3].(common.Address)
   360  	outstruct.UsageAsCollateralEnabled = out[4].(bool)
   361  	outstruct.BorrowingEnabled = out[5].(bool)
   362  	outstruct.StableBorrowRateEnabled = out[6].(bool)
   363  	outstruct.IsActive = out[7].(bool)
   364  
   365  	return *outstruct, err
   366  
   367  }
   368  
   369  // GetReserveConfigurationData is a free data retrieval call binding the contract method 0x3e150141.
   370  //
   371  // Solidity: function getReserveConfigurationData(address _reserve) view returns(uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, address interestRateStrategyAddress, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive)
   372  func (_Lendingpool *LendingpoolSession) GetReserveConfigurationData(_reserve common.Address) (struct {
   373  	Ltv                         *big.Int
   374  	LiquidationThreshold        *big.Int
   375  	LiquidationBonus            *big.Int
   376  	InterestRateStrategyAddress common.Address
   377  	UsageAsCollateralEnabled    bool
   378  	BorrowingEnabled            bool
   379  	StableBorrowRateEnabled     bool
   380  	IsActive                    bool
   381  }, error) {
   382  	return _Lendingpool.Contract.GetReserveConfigurationData(&_Lendingpool.CallOpts, _reserve)
   383  }
   384  
   385  // GetReserveConfigurationData is a free data retrieval call binding the contract method 0x3e150141.
   386  //
   387  // Solidity: function getReserveConfigurationData(address _reserve) view returns(uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, address interestRateStrategyAddress, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive)
   388  func (_Lendingpool *LendingpoolCallerSession) GetReserveConfigurationData(_reserve common.Address) (struct {
   389  	Ltv                         *big.Int
   390  	LiquidationThreshold        *big.Int
   391  	LiquidationBonus            *big.Int
   392  	InterestRateStrategyAddress common.Address
   393  	UsageAsCollateralEnabled    bool
   394  	BorrowingEnabled            bool
   395  	StableBorrowRateEnabled     bool
   396  	IsActive                    bool
   397  }, error) {
   398  	return _Lendingpool.Contract.GetReserveConfigurationData(&_Lendingpool.CallOpts, _reserve)
   399  }
   400  
   401  // GetReserveData is a free data retrieval call binding the contract method 0x35ea6a75.
   402  //
   403  // Solidity: function getReserveData(address _reserve) view returns(uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrowsStable, uint256 totalBorrowsVariable, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 variableBorrowIndex, address aTokenAddress, uint40 lastUpdateTimestamp)
   404  func (_Lendingpool *LendingpoolCaller) GetReserveData(opts *bind.CallOpts, _reserve common.Address) (struct {
   405  	TotalLiquidity          *big.Int
   406  	AvailableLiquidity      *big.Int
   407  	TotalBorrowsStable      *big.Int
   408  	TotalBorrowsVariable    *big.Int
   409  	LiquidityRate           *big.Int
   410  	VariableBorrowRate      *big.Int
   411  	StableBorrowRate        *big.Int
   412  	AverageStableBorrowRate *big.Int
   413  	UtilizationRate         *big.Int
   414  	LiquidityIndex          *big.Int
   415  	VariableBorrowIndex     *big.Int
   416  	ATokenAddress           common.Address
   417  	LastUpdateTimestamp     *big.Int
   418  }, error) {
   419  	var out []interface{}
   420  	err := _Lendingpool.contract.Call(opts, &out, "getReserveData", _reserve)
   421  
   422  	outstruct := new(struct {
   423  		TotalLiquidity          *big.Int
   424  		AvailableLiquidity      *big.Int
   425  		TotalBorrowsStable      *big.Int
   426  		TotalBorrowsVariable    *big.Int
   427  		LiquidityRate           *big.Int
   428  		VariableBorrowRate      *big.Int
   429  		StableBorrowRate        *big.Int
   430  		AverageStableBorrowRate *big.Int
   431  		UtilizationRate         *big.Int
   432  		LiquidityIndex          *big.Int
   433  		VariableBorrowIndex     *big.Int
   434  		ATokenAddress           common.Address
   435  		LastUpdateTimestamp     *big.Int
   436  	})
   437  
   438  	outstruct.TotalLiquidity = out[0].(*big.Int)
   439  	outstruct.AvailableLiquidity = out[1].(*big.Int)
   440  	outstruct.TotalBorrowsStable = out[2].(*big.Int)
   441  	outstruct.TotalBorrowsVariable = out[3].(*big.Int)
   442  	outstruct.LiquidityRate = out[4].(*big.Int)
   443  	outstruct.VariableBorrowRate = out[5].(*big.Int)
   444  	outstruct.StableBorrowRate = out[6].(*big.Int)
   445  	outstruct.AverageStableBorrowRate = out[7].(*big.Int)
   446  	outstruct.UtilizationRate = out[8].(*big.Int)
   447  	outstruct.LiquidityIndex = out[9].(*big.Int)
   448  	outstruct.VariableBorrowIndex = out[10].(*big.Int)
   449  	outstruct.ATokenAddress = out[11].(common.Address)
   450  	outstruct.LastUpdateTimestamp = out[12].(*big.Int)
   451  
   452  	return *outstruct, err
   453  
   454  }
   455  
   456  // GetReserveData is a free data retrieval call binding the contract method 0x35ea6a75.
   457  //
   458  // Solidity: function getReserveData(address _reserve) view returns(uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrowsStable, uint256 totalBorrowsVariable, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 variableBorrowIndex, address aTokenAddress, uint40 lastUpdateTimestamp)
   459  func (_Lendingpool *LendingpoolSession) GetReserveData(_reserve common.Address) (struct {
   460  	TotalLiquidity          *big.Int
   461  	AvailableLiquidity      *big.Int
   462  	TotalBorrowsStable      *big.Int
   463  	TotalBorrowsVariable    *big.Int
   464  	LiquidityRate           *big.Int
   465  	VariableBorrowRate      *big.Int
   466  	StableBorrowRate        *big.Int
   467  	AverageStableBorrowRate *big.Int
   468  	UtilizationRate         *big.Int
   469  	LiquidityIndex          *big.Int
   470  	VariableBorrowIndex     *big.Int
   471  	ATokenAddress           common.Address
   472  	LastUpdateTimestamp     *big.Int
   473  }, error) {
   474  	return _Lendingpool.Contract.GetReserveData(&_Lendingpool.CallOpts, _reserve)
   475  }
   476  
   477  // GetReserveData is a free data retrieval call binding the contract method 0x35ea6a75.
   478  //
   479  // Solidity: function getReserveData(address _reserve) view returns(uint256 totalLiquidity, uint256 availableLiquidity, uint256 totalBorrowsStable, uint256 totalBorrowsVariable, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 utilizationRate, uint256 liquidityIndex, uint256 variableBorrowIndex, address aTokenAddress, uint40 lastUpdateTimestamp)
   480  func (_Lendingpool *LendingpoolCallerSession) GetReserveData(_reserve common.Address) (struct {
   481  	TotalLiquidity          *big.Int
   482  	AvailableLiquidity      *big.Int
   483  	TotalBorrowsStable      *big.Int
   484  	TotalBorrowsVariable    *big.Int
   485  	LiquidityRate           *big.Int
   486  	VariableBorrowRate      *big.Int
   487  	StableBorrowRate        *big.Int
   488  	AverageStableBorrowRate *big.Int
   489  	UtilizationRate         *big.Int
   490  	LiquidityIndex          *big.Int
   491  	VariableBorrowIndex     *big.Int
   492  	ATokenAddress           common.Address
   493  	LastUpdateTimestamp     *big.Int
   494  }, error) {
   495  	return _Lendingpool.Contract.GetReserveData(&_Lendingpool.CallOpts, _reserve)
   496  }
   497  
   498  // GetReserves is a free data retrieval call binding the contract method 0x0902f1ac.
   499  //
   500  // Solidity: function getReserves() view returns(address[])
   501  func (_Lendingpool *LendingpoolCaller) GetReserves(opts *bind.CallOpts) ([]common.Address, error) {
   502  	var out []interface{}
   503  	err := _Lendingpool.contract.Call(opts, &out, "getReserves")
   504  
   505  	if err != nil {
   506  		return *new([]common.Address), err
   507  	}
   508  
   509  	out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address)
   510  
   511  	return out0, err
   512  
   513  }
   514  
   515  // GetReserves is a free data retrieval call binding the contract method 0x0902f1ac.
   516  //
   517  // Solidity: function getReserves() view returns(address[])
   518  func (_Lendingpool *LendingpoolSession) GetReserves() ([]common.Address, error) {
   519  	return _Lendingpool.Contract.GetReserves(&_Lendingpool.CallOpts)
   520  }
   521  
   522  // GetReserves is a free data retrieval call binding the contract method 0x0902f1ac.
   523  //
   524  // Solidity: function getReserves() view returns(address[])
   525  func (_Lendingpool *LendingpoolCallerSession) GetReserves() ([]common.Address, error) {
   526  	return _Lendingpool.Contract.GetReserves(&_Lendingpool.CallOpts)
   527  }
   528  
   529  // GetUserAccountData is a free data retrieval call binding the contract method 0xbf92857c.
   530  //
   531  // Solidity: function getUserAccountData(address _user) view returns(uint256 totalLiquidityETH, uint256 totalCollateralETH, uint256 totalBorrowsETH, uint256 totalFeesETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor)
   532  func (_Lendingpool *LendingpoolCaller) GetUserAccountData(opts *bind.CallOpts, _user common.Address) (struct {
   533  	TotalLiquidityETH           *big.Int
   534  	TotalCollateralETH          *big.Int
   535  	TotalBorrowsETH             *big.Int
   536  	TotalFeesETH                *big.Int
   537  	AvailableBorrowsETH         *big.Int
   538  	CurrentLiquidationThreshold *big.Int
   539  	Ltv                         *big.Int
   540  	HealthFactor                *big.Int
   541  }, error) {
   542  	var out []interface{}
   543  	err := _Lendingpool.contract.Call(opts, &out, "getUserAccountData", _user)
   544  
   545  	outstruct := new(struct {
   546  		TotalLiquidityETH           *big.Int
   547  		TotalCollateralETH          *big.Int
   548  		TotalBorrowsETH             *big.Int
   549  		TotalFeesETH                *big.Int
   550  		AvailableBorrowsETH         *big.Int
   551  		CurrentLiquidationThreshold *big.Int
   552  		Ltv                         *big.Int
   553  		HealthFactor                *big.Int
   554  	})
   555  
   556  	outstruct.TotalLiquidityETH = out[0].(*big.Int)
   557  	outstruct.TotalCollateralETH = out[1].(*big.Int)
   558  	outstruct.TotalBorrowsETH = out[2].(*big.Int)
   559  	outstruct.TotalFeesETH = out[3].(*big.Int)
   560  	outstruct.AvailableBorrowsETH = out[4].(*big.Int)
   561  	outstruct.CurrentLiquidationThreshold = out[5].(*big.Int)
   562  	outstruct.Ltv = out[6].(*big.Int)
   563  	outstruct.HealthFactor = out[7].(*big.Int)
   564  
   565  	return *outstruct, err
   566  
   567  }
   568  
   569  // GetUserAccountData is a free data retrieval call binding the contract method 0xbf92857c.
   570  //
   571  // Solidity: function getUserAccountData(address _user) view returns(uint256 totalLiquidityETH, uint256 totalCollateralETH, uint256 totalBorrowsETH, uint256 totalFeesETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor)
   572  func (_Lendingpool *LendingpoolSession) GetUserAccountData(_user common.Address) (struct {
   573  	TotalLiquidityETH           *big.Int
   574  	TotalCollateralETH          *big.Int
   575  	TotalBorrowsETH             *big.Int
   576  	TotalFeesETH                *big.Int
   577  	AvailableBorrowsETH         *big.Int
   578  	CurrentLiquidationThreshold *big.Int
   579  	Ltv                         *big.Int
   580  	HealthFactor                *big.Int
   581  }, error) {
   582  	return _Lendingpool.Contract.GetUserAccountData(&_Lendingpool.CallOpts, _user)
   583  }
   584  
   585  // GetUserAccountData is a free data retrieval call binding the contract method 0xbf92857c.
   586  //
   587  // Solidity: function getUserAccountData(address _user) view returns(uint256 totalLiquidityETH, uint256 totalCollateralETH, uint256 totalBorrowsETH, uint256 totalFeesETH, uint256 availableBorrowsETH, uint256 currentLiquidationThreshold, uint256 ltv, uint256 healthFactor)
   588  func (_Lendingpool *LendingpoolCallerSession) GetUserAccountData(_user common.Address) (struct {
   589  	TotalLiquidityETH           *big.Int
   590  	TotalCollateralETH          *big.Int
   591  	TotalBorrowsETH             *big.Int
   592  	TotalFeesETH                *big.Int
   593  	AvailableBorrowsETH         *big.Int
   594  	CurrentLiquidationThreshold *big.Int
   595  	Ltv                         *big.Int
   596  	HealthFactor                *big.Int
   597  }, error) {
   598  	return _Lendingpool.Contract.GetUserAccountData(&_Lendingpool.CallOpts, _user)
   599  }
   600  
   601  // GetUserReserveData is a free data retrieval call binding the contract method 0x28dd2d01.
   602  //
   603  // Solidity: function getUserReserveData(address _reserve, address _user) view returns(uint256 currentATokenBalance, uint256 currentBorrowBalance, uint256 principalBorrowBalance, uint256 borrowRateMode, uint256 borrowRate, uint256 liquidityRate, uint256 originationFee, uint256 variableBorrowIndex, uint256 lastUpdateTimestamp, bool usageAsCollateralEnabled)
   604  func (_Lendingpool *LendingpoolCaller) GetUserReserveData(opts *bind.CallOpts, _reserve common.Address, _user common.Address) (struct {
   605  	CurrentATokenBalance     *big.Int
   606  	CurrentBorrowBalance     *big.Int
   607  	PrincipalBorrowBalance   *big.Int
   608  	BorrowRateMode           *big.Int
   609  	BorrowRate               *big.Int
   610  	LiquidityRate            *big.Int
   611  	OriginationFee           *big.Int
   612  	VariableBorrowIndex      *big.Int
   613  	LastUpdateTimestamp      *big.Int
   614  	UsageAsCollateralEnabled bool
   615  }, error) {
   616  	var out []interface{}
   617  	err := _Lendingpool.contract.Call(opts, &out, "getUserReserveData", _reserve, _user)
   618  
   619  	outstruct := new(struct {
   620  		CurrentATokenBalance     *big.Int
   621  		CurrentBorrowBalance     *big.Int
   622  		PrincipalBorrowBalance   *big.Int
   623  		BorrowRateMode           *big.Int
   624  		BorrowRate               *big.Int
   625  		LiquidityRate            *big.Int
   626  		OriginationFee           *big.Int
   627  		VariableBorrowIndex      *big.Int
   628  		LastUpdateTimestamp      *big.Int
   629  		UsageAsCollateralEnabled bool
   630  	})
   631  
   632  	outstruct.CurrentATokenBalance = out[0].(*big.Int)
   633  	outstruct.CurrentBorrowBalance = out[1].(*big.Int)
   634  	outstruct.PrincipalBorrowBalance = out[2].(*big.Int)
   635  	outstruct.BorrowRateMode = out[3].(*big.Int)
   636  	outstruct.BorrowRate = out[4].(*big.Int)
   637  	outstruct.LiquidityRate = out[5].(*big.Int)
   638  	outstruct.OriginationFee = out[6].(*big.Int)
   639  	outstruct.VariableBorrowIndex = out[7].(*big.Int)
   640  	outstruct.LastUpdateTimestamp = out[8].(*big.Int)
   641  	outstruct.UsageAsCollateralEnabled = out[9].(bool)
   642  
   643  	return *outstruct, err
   644  
   645  }
   646  
   647  // GetUserReserveData is a free data retrieval call binding the contract method 0x28dd2d01.
   648  //
   649  // Solidity: function getUserReserveData(address _reserve, address _user) view returns(uint256 currentATokenBalance, uint256 currentBorrowBalance, uint256 principalBorrowBalance, uint256 borrowRateMode, uint256 borrowRate, uint256 liquidityRate, uint256 originationFee, uint256 variableBorrowIndex, uint256 lastUpdateTimestamp, bool usageAsCollateralEnabled)
   650  func (_Lendingpool *LendingpoolSession) GetUserReserveData(_reserve common.Address, _user common.Address) (struct {
   651  	CurrentATokenBalance     *big.Int
   652  	CurrentBorrowBalance     *big.Int
   653  	PrincipalBorrowBalance   *big.Int
   654  	BorrowRateMode           *big.Int
   655  	BorrowRate               *big.Int
   656  	LiquidityRate            *big.Int
   657  	OriginationFee           *big.Int
   658  	VariableBorrowIndex      *big.Int
   659  	LastUpdateTimestamp      *big.Int
   660  	UsageAsCollateralEnabled bool
   661  }, error) {
   662  	return _Lendingpool.Contract.GetUserReserveData(&_Lendingpool.CallOpts, _reserve, _user)
   663  }
   664  
   665  // GetUserReserveData is a free data retrieval call binding the contract method 0x28dd2d01.
   666  //
   667  // Solidity: function getUserReserveData(address _reserve, address _user) view returns(uint256 currentATokenBalance, uint256 currentBorrowBalance, uint256 principalBorrowBalance, uint256 borrowRateMode, uint256 borrowRate, uint256 liquidityRate, uint256 originationFee, uint256 variableBorrowIndex, uint256 lastUpdateTimestamp, bool usageAsCollateralEnabled)
   668  func (_Lendingpool *LendingpoolCallerSession) GetUserReserveData(_reserve common.Address, _user common.Address) (struct {
   669  	CurrentATokenBalance     *big.Int
   670  	CurrentBorrowBalance     *big.Int
   671  	PrincipalBorrowBalance   *big.Int
   672  	BorrowRateMode           *big.Int
   673  	BorrowRate               *big.Int
   674  	LiquidityRate            *big.Int
   675  	OriginationFee           *big.Int
   676  	VariableBorrowIndex      *big.Int
   677  	LastUpdateTimestamp      *big.Int
   678  	UsageAsCollateralEnabled bool
   679  }, error) {
   680  	return _Lendingpool.Contract.GetUserReserveData(&_Lendingpool.CallOpts, _reserve, _user)
   681  }
   682  
   683  // ParametersProvider is a free data retrieval call binding the contract method 0x58707e06.
   684  //
   685  // Solidity: function parametersProvider() view returns(address)
   686  func (_Lendingpool *LendingpoolCaller) ParametersProvider(opts *bind.CallOpts) (common.Address, error) {
   687  	var out []interface{}
   688  	err := _Lendingpool.contract.Call(opts, &out, "parametersProvider")
   689  
   690  	if err != nil {
   691  		return *new(common.Address), err
   692  	}
   693  
   694  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   695  
   696  	return out0, err
   697  
   698  }
   699  
   700  // ParametersProvider is a free data retrieval call binding the contract method 0x58707e06.
   701  //
   702  // Solidity: function parametersProvider() view returns(address)
   703  func (_Lendingpool *LendingpoolSession) ParametersProvider() (common.Address, error) {
   704  	return _Lendingpool.Contract.ParametersProvider(&_Lendingpool.CallOpts)
   705  }
   706  
   707  // ParametersProvider is a free data retrieval call binding the contract method 0x58707e06.
   708  //
   709  // Solidity: function parametersProvider() view returns(address)
   710  func (_Lendingpool *LendingpoolCallerSession) ParametersProvider() (common.Address, error) {
   711  	return _Lendingpool.Contract.ParametersProvider(&_Lendingpool.CallOpts)
   712  }
   713  
   714  // Borrow is a paid mutator transaction binding the contract method 0xc858f5f9.
   715  //
   716  // Solidity: function borrow(address _reserve, uint256 _amount, uint256 _interestRateMode, uint16 _referralCode) returns()
   717  func (_Lendingpool *LendingpoolTransactor) Borrow(opts *bind.TransactOpts, _reserve common.Address, _amount *big.Int, _interestRateMode *big.Int, _referralCode uint16) (*types.Transaction, error) {
   718  	return _Lendingpool.contract.Transact(opts, "borrow", _reserve, _amount, _interestRateMode, _referralCode)
   719  }
   720  
   721  // Borrow is a paid mutator transaction binding the contract method 0xc858f5f9.
   722  //
   723  // Solidity: function borrow(address _reserve, uint256 _amount, uint256 _interestRateMode, uint16 _referralCode) returns()
   724  func (_Lendingpool *LendingpoolSession) Borrow(_reserve common.Address, _amount *big.Int, _interestRateMode *big.Int, _referralCode uint16) (*types.Transaction, error) {
   725  	return _Lendingpool.Contract.Borrow(&_Lendingpool.TransactOpts, _reserve, _amount, _interestRateMode, _referralCode)
   726  }
   727  
   728  // Borrow is a paid mutator transaction binding the contract method 0xc858f5f9.
   729  //
   730  // Solidity: function borrow(address _reserve, uint256 _amount, uint256 _interestRateMode, uint16 _referralCode) returns()
   731  func (_Lendingpool *LendingpoolTransactorSession) Borrow(_reserve common.Address, _amount *big.Int, _interestRateMode *big.Int, _referralCode uint16) (*types.Transaction, error) {
   732  	return _Lendingpool.Contract.Borrow(&_Lendingpool.TransactOpts, _reserve, _amount, _interestRateMode, _referralCode)
   733  }
   734  
   735  // Deposit is a paid mutator transaction binding the contract method 0xd2d0e066.
   736  //
   737  // Solidity: function deposit(address _reserve, uint256 _amount, uint16 _referralCode) payable returns()
   738  func (_Lendingpool *LendingpoolTransactor) Deposit(opts *bind.TransactOpts, _reserve common.Address, _amount *big.Int, _referralCode uint16) (*types.Transaction, error) {
   739  	return _Lendingpool.contract.Transact(opts, "deposit", _reserve, _amount, _referralCode)
   740  }
   741  
   742  // Deposit is a paid mutator transaction binding the contract method 0xd2d0e066.
   743  //
   744  // Solidity: function deposit(address _reserve, uint256 _amount, uint16 _referralCode) payable returns()
   745  func (_Lendingpool *LendingpoolSession) Deposit(_reserve common.Address, _amount *big.Int, _referralCode uint16) (*types.Transaction, error) {
   746  	return _Lendingpool.Contract.Deposit(&_Lendingpool.TransactOpts, _reserve, _amount, _referralCode)
   747  }
   748  
   749  // Deposit is a paid mutator transaction binding the contract method 0xd2d0e066.
   750  //
   751  // Solidity: function deposit(address _reserve, uint256 _amount, uint16 _referralCode) payable returns()
   752  func (_Lendingpool *LendingpoolTransactorSession) Deposit(_reserve common.Address, _amount *big.Int, _referralCode uint16) (*types.Transaction, error) {
   753  	return _Lendingpool.Contract.Deposit(&_Lendingpool.TransactOpts, _reserve, _amount, _referralCode)
   754  }
   755  
   756  // FlashLoan is a paid mutator transaction binding the contract method 0x5cffe9de.
   757  //
   758  // Solidity: function flashLoan(address _receiver, address _reserve, uint256 _amount, bytes _params) returns()
   759  func (_Lendingpool *LendingpoolTransactor) FlashLoan(opts *bind.TransactOpts, _receiver common.Address, _reserve common.Address, _amount *big.Int, _params []byte) (*types.Transaction, error) {
   760  	return _Lendingpool.contract.Transact(opts, "flashLoan", _receiver, _reserve, _amount, _params)
   761  }
   762  
   763  // FlashLoan is a paid mutator transaction binding the contract method 0x5cffe9de.
   764  //
   765  // Solidity: function flashLoan(address _receiver, address _reserve, uint256 _amount, bytes _params) returns()
   766  func (_Lendingpool *LendingpoolSession) FlashLoan(_receiver common.Address, _reserve common.Address, _amount *big.Int, _params []byte) (*types.Transaction, error) {
   767  	return _Lendingpool.Contract.FlashLoan(&_Lendingpool.TransactOpts, _receiver, _reserve, _amount, _params)
   768  }
   769  
   770  // FlashLoan is a paid mutator transaction binding the contract method 0x5cffe9de.
   771  //
   772  // Solidity: function flashLoan(address _receiver, address _reserve, uint256 _amount, bytes _params) returns()
   773  func (_Lendingpool *LendingpoolTransactorSession) FlashLoan(_receiver common.Address, _reserve common.Address, _amount *big.Int, _params []byte) (*types.Transaction, error) {
   774  	return _Lendingpool.Contract.FlashLoan(&_Lendingpool.TransactOpts, _receiver, _reserve, _amount, _params)
   775  }
   776  
   777  // Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.
   778  //
   779  // Solidity: function initialize(address _addressesProvider) returns()
   780  func (_Lendingpool *LendingpoolTransactor) Initialize(opts *bind.TransactOpts, _addressesProvider common.Address) (*types.Transaction, error) {
   781  	return _Lendingpool.contract.Transact(opts, "initialize", _addressesProvider)
   782  }
   783  
   784  // Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.
   785  //
   786  // Solidity: function initialize(address _addressesProvider) returns()
   787  func (_Lendingpool *LendingpoolSession) Initialize(_addressesProvider common.Address) (*types.Transaction, error) {
   788  	return _Lendingpool.Contract.Initialize(&_Lendingpool.TransactOpts, _addressesProvider)
   789  }
   790  
   791  // Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.
   792  //
   793  // Solidity: function initialize(address _addressesProvider) returns()
   794  func (_Lendingpool *LendingpoolTransactorSession) Initialize(_addressesProvider common.Address) (*types.Transaction, error) {
   795  	return _Lendingpool.Contract.Initialize(&_Lendingpool.TransactOpts, _addressesProvider)
   796  }
   797  
   798  // LiquidationCall is a paid mutator transaction binding the contract method 0x00a718a9.
   799  //
   800  // Solidity: function liquidationCall(address _collateral, address _reserve, address _user, uint256 _purchaseAmount, bool _receiveAToken) payable returns()
   801  func (_Lendingpool *LendingpoolTransactor) LiquidationCall(opts *bind.TransactOpts, _collateral common.Address, _reserve common.Address, _user common.Address, _purchaseAmount *big.Int, _receiveAToken bool) (*types.Transaction, error) {
   802  	return _Lendingpool.contract.Transact(opts, "liquidationCall", _collateral, _reserve, _user, _purchaseAmount, _receiveAToken)
   803  }
   804  
   805  // LiquidationCall is a paid mutator transaction binding the contract method 0x00a718a9.
   806  //
   807  // Solidity: function liquidationCall(address _collateral, address _reserve, address _user, uint256 _purchaseAmount, bool _receiveAToken) payable returns()
   808  func (_Lendingpool *LendingpoolSession) LiquidationCall(_collateral common.Address, _reserve common.Address, _user common.Address, _purchaseAmount *big.Int, _receiveAToken bool) (*types.Transaction, error) {
   809  	return _Lendingpool.Contract.LiquidationCall(&_Lendingpool.TransactOpts, _collateral, _reserve, _user, _purchaseAmount, _receiveAToken)
   810  }
   811  
   812  // LiquidationCall is a paid mutator transaction binding the contract method 0x00a718a9.
   813  //
   814  // Solidity: function liquidationCall(address _collateral, address _reserve, address _user, uint256 _purchaseAmount, bool _receiveAToken) payable returns()
   815  func (_Lendingpool *LendingpoolTransactorSession) LiquidationCall(_collateral common.Address, _reserve common.Address, _user common.Address, _purchaseAmount *big.Int, _receiveAToken bool) (*types.Transaction, error) {
   816  	return _Lendingpool.Contract.LiquidationCall(&_Lendingpool.TransactOpts, _collateral, _reserve, _user, _purchaseAmount, _receiveAToken)
   817  }
   818  
   819  // RebalanceStableBorrowRate is a paid mutator transaction binding the contract method 0xcd112382.
   820  //
   821  // Solidity: function rebalanceStableBorrowRate(address _reserve, address _user) returns()
   822  func (_Lendingpool *LendingpoolTransactor) RebalanceStableBorrowRate(opts *bind.TransactOpts, _reserve common.Address, _user common.Address) (*types.Transaction, error) {
   823  	return _Lendingpool.contract.Transact(opts, "rebalanceStableBorrowRate", _reserve, _user)
   824  }
   825  
   826  // RebalanceStableBorrowRate is a paid mutator transaction binding the contract method 0xcd112382.
   827  //
   828  // Solidity: function rebalanceStableBorrowRate(address _reserve, address _user) returns()
   829  func (_Lendingpool *LendingpoolSession) RebalanceStableBorrowRate(_reserve common.Address, _user common.Address) (*types.Transaction, error) {
   830  	return _Lendingpool.Contract.RebalanceStableBorrowRate(&_Lendingpool.TransactOpts, _reserve, _user)
   831  }
   832  
   833  // RebalanceStableBorrowRate is a paid mutator transaction binding the contract method 0xcd112382.
   834  //
   835  // Solidity: function rebalanceStableBorrowRate(address _reserve, address _user) returns()
   836  func (_Lendingpool *LendingpoolTransactorSession) RebalanceStableBorrowRate(_reserve common.Address, _user common.Address) (*types.Transaction, error) {
   837  	return _Lendingpool.Contract.RebalanceStableBorrowRate(&_Lendingpool.TransactOpts, _reserve, _user)
   838  }
   839  
   840  // RedeemUnderlying is a paid mutator transaction binding the contract method 0x9895e3d8.
   841  //
   842  // Solidity: function redeemUnderlying(address _reserve, address _user, uint256 _amount, uint256 _aTokenBalanceAfterRedeem) returns()
   843  func (_Lendingpool *LendingpoolTransactor) RedeemUnderlying(opts *bind.TransactOpts, _reserve common.Address, _user common.Address, _amount *big.Int, _aTokenBalanceAfterRedeem *big.Int) (*types.Transaction, error) {
   844  	return _Lendingpool.contract.Transact(opts, "redeemUnderlying", _reserve, _user, _amount, _aTokenBalanceAfterRedeem)
   845  }
   846  
   847  // RedeemUnderlying is a paid mutator transaction binding the contract method 0x9895e3d8.
   848  //
   849  // Solidity: function redeemUnderlying(address _reserve, address _user, uint256 _amount, uint256 _aTokenBalanceAfterRedeem) returns()
   850  func (_Lendingpool *LendingpoolSession) RedeemUnderlying(_reserve common.Address, _user common.Address, _amount *big.Int, _aTokenBalanceAfterRedeem *big.Int) (*types.Transaction, error) {
   851  	return _Lendingpool.Contract.RedeemUnderlying(&_Lendingpool.TransactOpts, _reserve, _user, _amount, _aTokenBalanceAfterRedeem)
   852  }
   853  
   854  // RedeemUnderlying is a paid mutator transaction binding the contract method 0x9895e3d8.
   855  //
   856  // Solidity: function redeemUnderlying(address _reserve, address _user, uint256 _amount, uint256 _aTokenBalanceAfterRedeem) returns()
   857  func (_Lendingpool *LendingpoolTransactorSession) RedeemUnderlying(_reserve common.Address, _user common.Address, _amount *big.Int, _aTokenBalanceAfterRedeem *big.Int) (*types.Transaction, error) {
   858  	return _Lendingpool.Contract.RedeemUnderlying(&_Lendingpool.TransactOpts, _reserve, _user, _amount, _aTokenBalanceAfterRedeem)
   859  }
   860  
   861  // Repay is a paid mutator transaction binding the contract method 0x5ceae9c4.
   862  //
   863  // Solidity: function repay(address _reserve, uint256 _amount, address _onBehalfOf) payable returns()
   864  func (_Lendingpool *LendingpoolTransactor) Repay(opts *bind.TransactOpts, _reserve common.Address, _amount *big.Int, _onBehalfOf common.Address) (*types.Transaction, error) {
   865  	return _Lendingpool.contract.Transact(opts, "repay", _reserve, _amount, _onBehalfOf)
   866  }
   867  
   868  // Repay is a paid mutator transaction binding the contract method 0x5ceae9c4.
   869  //
   870  // Solidity: function repay(address _reserve, uint256 _amount, address _onBehalfOf) payable returns()
   871  func (_Lendingpool *LendingpoolSession) Repay(_reserve common.Address, _amount *big.Int, _onBehalfOf common.Address) (*types.Transaction, error) {
   872  	return _Lendingpool.Contract.Repay(&_Lendingpool.TransactOpts, _reserve, _amount, _onBehalfOf)
   873  }
   874  
   875  // Repay is a paid mutator transaction binding the contract method 0x5ceae9c4.
   876  //
   877  // Solidity: function repay(address _reserve, uint256 _amount, address _onBehalfOf) payable returns()
   878  func (_Lendingpool *LendingpoolTransactorSession) Repay(_reserve common.Address, _amount *big.Int, _onBehalfOf common.Address) (*types.Transaction, error) {
   879  	return _Lendingpool.Contract.Repay(&_Lendingpool.TransactOpts, _reserve, _amount, _onBehalfOf)
   880  }
   881  
   882  // SetUserUseReserveAsCollateral is a paid mutator transaction binding the contract method 0x5a3b74b9.
   883  //
   884  // Solidity: function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) returns()
   885  func (_Lendingpool *LendingpoolTransactor) SetUserUseReserveAsCollateral(opts *bind.TransactOpts, _reserve common.Address, _useAsCollateral bool) (*types.Transaction, error) {
   886  	return _Lendingpool.contract.Transact(opts, "setUserUseReserveAsCollateral", _reserve, _useAsCollateral)
   887  }
   888  
   889  // SetUserUseReserveAsCollateral is a paid mutator transaction binding the contract method 0x5a3b74b9.
   890  //
   891  // Solidity: function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) returns()
   892  func (_Lendingpool *LendingpoolSession) SetUserUseReserveAsCollateral(_reserve common.Address, _useAsCollateral bool) (*types.Transaction, error) {
   893  	return _Lendingpool.Contract.SetUserUseReserveAsCollateral(&_Lendingpool.TransactOpts, _reserve, _useAsCollateral)
   894  }
   895  
   896  // SetUserUseReserveAsCollateral is a paid mutator transaction binding the contract method 0x5a3b74b9.
   897  //
   898  // Solidity: function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) returns()
   899  func (_Lendingpool *LendingpoolTransactorSession) SetUserUseReserveAsCollateral(_reserve common.Address, _useAsCollateral bool) (*types.Transaction, error) {
   900  	return _Lendingpool.Contract.SetUserUseReserveAsCollateral(&_Lendingpool.TransactOpts, _reserve, _useAsCollateral)
   901  }
   902  
   903  // SwapBorrowRateMode is a paid mutator transaction binding the contract method 0x48ca1300.
   904  //
   905  // Solidity: function swapBorrowRateMode(address _reserve) returns()
   906  func (_Lendingpool *LendingpoolTransactor) SwapBorrowRateMode(opts *bind.TransactOpts, _reserve common.Address) (*types.Transaction, error) {
   907  	return _Lendingpool.contract.Transact(opts, "swapBorrowRateMode", _reserve)
   908  }
   909  
   910  // SwapBorrowRateMode is a paid mutator transaction binding the contract method 0x48ca1300.
   911  //
   912  // Solidity: function swapBorrowRateMode(address _reserve) returns()
   913  func (_Lendingpool *LendingpoolSession) SwapBorrowRateMode(_reserve common.Address) (*types.Transaction, error) {
   914  	return _Lendingpool.Contract.SwapBorrowRateMode(&_Lendingpool.TransactOpts, _reserve)
   915  }
   916  
   917  // SwapBorrowRateMode is a paid mutator transaction binding the contract method 0x48ca1300.
   918  //
   919  // Solidity: function swapBorrowRateMode(address _reserve) returns()
   920  func (_Lendingpool *LendingpoolTransactorSession) SwapBorrowRateMode(_reserve common.Address) (*types.Transaction, error) {
   921  	return _Lendingpool.Contract.SwapBorrowRateMode(&_Lendingpool.TransactOpts, _reserve)
   922  }
   923  
   924  // LendingpoolBorrowIterator is returned from FilterBorrow and is used to iterate over the raw logs and unpacked data for Borrow events raised by the Lendingpool contract.
   925  type LendingpoolBorrowIterator struct {
   926  	Event *LendingpoolBorrow // Event containing the contract specifics and raw log
   927  
   928  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   929  	event    string              // Event name to use for unpacking event data
   930  
   931  	logs chan types.Log        // Log channel receiving the found contract events
   932  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   933  	done bool                  // Whether the subscription completed delivering logs
   934  	fail error                 // Occurred error to stop iteration
   935  }
   936  
   937  // Next advances the iterator to the subsequent event, returning whether there
   938  // are any more events found. In case of a retrieval or parsing error, false is
   939  // returned and Error() can be queried for the exact failure.
   940  func (it *LendingpoolBorrowIterator) Next() bool {
   941  	// If the iterator failed, stop iterating
   942  	if it.fail != nil {
   943  		return false
   944  	}
   945  	// If the iterator completed, deliver directly whatever's available
   946  	if it.done {
   947  		select {
   948  		case log := <-it.logs:
   949  			it.Event = new(LendingpoolBorrow)
   950  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   951  				it.fail = err
   952  				return false
   953  			}
   954  			it.Event.Raw = log
   955  			return true
   956  
   957  		default:
   958  			return false
   959  		}
   960  	}
   961  	// Iterator still in progress, wait for either a data or an error event
   962  	select {
   963  	case log := <-it.logs:
   964  		it.Event = new(LendingpoolBorrow)
   965  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   966  			it.fail = err
   967  			return false
   968  		}
   969  		it.Event.Raw = log
   970  		return true
   971  
   972  	case err := <-it.sub.Err():
   973  		it.done = true
   974  		it.fail = err
   975  		return it.Next()
   976  	}
   977  }
   978  
   979  // Error returns any retrieval or parsing error occurred during filtering.
   980  func (it *LendingpoolBorrowIterator) Error() error {
   981  	return it.fail
   982  }
   983  
   984  // Close terminates the iteration process, releasing any pending underlying
   985  // resources.
   986  func (it *LendingpoolBorrowIterator) Close() error {
   987  	it.sub.Unsubscribe()
   988  	return nil
   989  }
   990  
   991  // LendingpoolBorrow represents a Borrow event raised by the Lendingpool contract.
   992  type LendingpoolBorrow struct {
   993  	Reserve               common.Address
   994  	User                  common.Address
   995  	Amount                *big.Int
   996  	BorrowRateMode        *big.Int
   997  	BorrowRate            *big.Int
   998  	OriginationFee        *big.Int
   999  	BorrowBalanceIncrease *big.Int
  1000  	Referral              uint16
  1001  	Timestamp             *big.Int
  1002  	Raw                   types.Log // Blockchain specific contextual infos
  1003  }
  1004  
  1005  // FilterBorrow is a free log retrieval operation binding the contract event 0x1e77446728e5558aa1b7e81e0cdab9cc1b075ba893b740600c76a315c2caa553.
  1006  //
  1007  // Solidity: event Borrow(address indexed _reserve, address indexed _user, uint256 _amount, uint256 _borrowRateMode, uint256 _borrowRate, uint256 _originationFee, uint256 _borrowBalanceIncrease, uint16 indexed _referral, uint256 _timestamp)
  1008  func (_Lendingpool *LendingpoolFilterer) FilterBorrow(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address, _referral []uint16) (*LendingpoolBorrowIterator, error) {
  1009  
  1010  	var _reserveRule []interface{}
  1011  	for _, _reserveItem := range _reserve {
  1012  		_reserveRule = append(_reserveRule, _reserveItem)
  1013  	}
  1014  	var _userRule []interface{}
  1015  	for _, _userItem := range _user {
  1016  		_userRule = append(_userRule, _userItem)
  1017  	}
  1018  
  1019  	var _referralRule []interface{}
  1020  	for _, _referralItem := range _referral {
  1021  		_referralRule = append(_referralRule, _referralItem)
  1022  	}
  1023  
  1024  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "Borrow", _reserveRule, _userRule, _referralRule)
  1025  	if err != nil {
  1026  		return nil, err
  1027  	}
  1028  	return &LendingpoolBorrowIterator{contract: _Lendingpool.contract, event: "Borrow", logs: logs, sub: sub}, nil
  1029  }
  1030  
  1031  // WatchBorrow is a free log subscription operation binding the contract event 0x1e77446728e5558aa1b7e81e0cdab9cc1b075ba893b740600c76a315c2caa553.
  1032  //
  1033  // Solidity: event Borrow(address indexed _reserve, address indexed _user, uint256 _amount, uint256 _borrowRateMode, uint256 _borrowRate, uint256 _originationFee, uint256 _borrowBalanceIncrease, uint16 indexed _referral, uint256 _timestamp)
  1034  func (_Lendingpool *LendingpoolFilterer) WatchBorrow(opts *bind.WatchOpts, sink chan<- *LendingpoolBorrow, _reserve []common.Address, _user []common.Address, _referral []uint16) (event.Subscription, error) {
  1035  
  1036  	var _reserveRule []interface{}
  1037  	for _, _reserveItem := range _reserve {
  1038  		_reserveRule = append(_reserveRule, _reserveItem)
  1039  	}
  1040  	var _userRule []interface{}
  1041  	for _, _userItem := range _user {
  1042  		_userRule = append(_userRule, _userItem)
  1043  	}
  1044  
  1045  	var _referralRule []interface{}
  1046  	for _, _referralItem := range _referral {
  1047  		_referralRule = append(_referralRule, _referralItem)
  1048  	}
  1049  
  1050  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "Borrow", _reserveRule, _userRule, _referralRule)
  1051  	if err != nil {
  1052  		return nil, err
  1053  	}
  1054  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1055  		defer sub.Unsubscribe()
  1056  		for {
  1057  			select {
  1058  			case log := <-logs:
  1059  				// New log arrived, parse the event and forward to the user
  1060  				event := new(LendingpoolBorrow)
  1061  				if err := _Lendingpool.contract.UnpackLog(event, "Borrow", log); err != nil {
  1062  					return err
  1063  				}
  1064  				event.Raw = log
  1065  
  1066  				select {
  1067  				case sink <- event:
  1068  				case err := <-sub.Err():
  1069  					return err
  1070  				case <-quit:
  1071  					return nil
  1072  				}
  1073  			case err := <-sub.Err():
  1074  				return err
  1075  			case <-quit:
  1076  				return nil
  1077  			}
  1078  		}
  1079  	}), nil
  1080  }
  1081  
  1082  // ParseBorrow is a log parse operation binding the contract event 0x1e77446728e5558aa1b7e81e0cdab9cc1b075ba893b740600c76a315c2caa553.
  1083  //
  1084  // Solidity: event Borrow(address indexed _reserve, address indexed _user, uint256 _amount, uint256 _borrowRateMode, uint256 _borrowRate, uint256 _originationFee, uint256 _borrowBalanceIncrease, uint16 indexed _referral, uint256 _timestamp)
  1085  func (_Lendingpool *LendingpoolFilterer) ParseBorrow(log types.Log) (*LendingpoolBorrow, error) {
  1086  	event := new(LendingpoolBorrow)
  1087  	if err := _Lendingpool.contract.UnpackLog(event, "Borrow", log); err != nil {
  1088  		return nil, err
  1089  	}
  1090  	return event, nil
  1091  }
  1092  
  1093  // LendingpoolDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Lendingpool contract.
  1094  type LendingpoolDepositIterator struct {
  1095  	Event *LendingpoolDeposit // Event containing the contract specifics and raw log
  1096  
  1097  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1098  	event    string              // Event name to use for unpacking event data
  1099  
  1100  	logs chan types.Log        // Log channel receiving the found contract events
  1101  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1102  	done bool                  // Whether the subscription completed delivering logs
  1103  	fail error                 // Occurred error to stop iteration
  1104  }
  1105  
  1106  // Next advances the iterator to the subsequent event, returning whether there
  1107  // are any more events found. In case of a retrieval or parsing error, false is
  1108  // returned and Error() can be queried for the exact failure.
  1109  func (it *LendingpoolDepositIterator) Next() bool {
  1110  	// If the iterator failed, stop iterating
  1111  	if it.fail != nil {
  1112  		return false
  1113  	}
  1114  	// If the iterator completed, deliver directly whatever's available
  1115  	if it.done {
  1116  		select {
  1117  		case log := <-it.logs:
  1118  			it.Event = new(LendingpoolDeposit)
  1119  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1120  				it.fail = err
  1121  				return false
  1122  			}
  1123  			it.Event.Raw = log
  1124  			return true
  1125  
  1126  		default:
  1127  			return false
  1128  		}
  1129  	}
  1130  	// Iterator still in progress, wait for either a data or an error event
  1131  	select {
  1132  	case log := <-it.logs:
  1133  		it.Event = new(LendingpoolDeposit)
  1134  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1135  			it.fail = err
  1136  			return false
  1137  		}
  1138  		it.Event.Raw = log
  1139  		return true
  1140  
  1141  	case err := <-it.sub.Err():
  1142  		it.done = true
  1143  		it.fail = err
  1144  		return it.Next()
  1145  	}
  1146  }
  1147  
  1148  // Error returns any retrieval or parsing error occurred during filtering.
  1149  func (it *LendingpoolDepositIterator) Error() error {
  1150  	return it.fail
  1151  }
  1152  
  1153  // Close terminates the iteration process, releasing any pending underlying
  1154  // resources.
  1155  func (it *LendingpoolDepositIterator) Close() error {
  1156  	it.sub.Unsubscribe()
  1157  	return nil
  1158  }
  1159  
  1160  // LendingpoolDeposit represents a Deposit event raised by the Lendingpool contract.
  1161  type LendingpoolDeposit struct {
  1162  	Reserve   common.Address
  1163  	User      common.Address
  1164  	Amount    *big.Int
  1165  	Referral  uint16
  1166  	Timestamp *big.Int
  1167  	Raw       types.Log // Blockchain specific contextual infos
  1168  }
  1169  
  1170  // FilterDeposit is a free log retrieval operation binding the contract event 0xc12c57b1c73a2c3a2ea4613e9476abb3d8d146857aab7329e24243fb59710c82.
  1171  //
  1172  // Solidity: event Deposit(address indexed _reserve, address indexed _user, uint256 _amount, uint16 indexed _referral, uint256 _timestamp)
  1173  func (_Lendingpool *LendingpoolFilterer) FilterDeposit(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address, _referral []uint16) (*LendingpoolDepositIterator, error) {
  1174  
  1175  	var _reserveRule []interface{}
  1176  	for _, _reserveItem := range _reserve {
  1177  		_reserveRule = append(_reserveRule, _reserveItem)
  1178  	}
  1179  	var _userRule []interface{}
  1180  	for _, _userItem := range _user {
  1181  		_userRule = append(_userRule, _userItem)
  1182  	}
  1183  
  1184  	var _referralRule []interface{}
  1185  	for _, _referralItem := range _referral {
  1186  		_referralRule = append(_referralRule, _referralItem)
  1187  	}
  1188  
  1189  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "Deposit", _reserveRule, _userRule, _referralRule)
  1190  	if err != nil {
  1191  		return nil, err
  1192  	}
  1193  	return &LendingpoolDepositIterator{contract: _Lendingpool.contract, event: "Deposit", logs: logs, sub: sub}, nil
  1194  }
  1195  
  1196  // WatchDeposit is a free log subscription operation binding the contract event 0xc12c57b1c73a2c3a2ea4613e9476abb3d8d146857aab7329e24243fb59710c82.
  1197  //
  1198  // Solidity: event Deposit(address indexed _reserve, address indexed _user, uint256 _amount, uint16 indexed _referral, uint256 _timestamp)
  1199  func (_Lendingpool *LendingpoolFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *LendingpoolDeposit, _reserve []common.Address, _user []common.Address, _referral []uint16) (event.Subscription, error) {
  1200  
  1201  	var _reserveRule []interface{}
  1202  	for _, _reserveItem := range _reserve {
  1203  		_reserveRule = append(_reserveRule, _reserveItem)
  1204  	}
  1205  	var _userRule []interface{}
  1206  	for _, _userItem := range _user {
  1207  		_userRule = append(_userRule, _userItem)
  1208  	}
  1209  
  1210  	var _referralRule []interface{}
  1211  	for _, _referralItem := range _referral {
  1212  		_referralRule = append(_referralRule, _referralItem)
  1213  	}
  1214  
  1215  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "Deposit", _reserveRule, _userRule, _referralRule)
  1216  	if err != nil {
  1217  		return nil, err
  1218  	}
  1219  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1220  		defer sub.Unsubscribe()
  1221  		for {
  1222  			select {
  1223  			case log := <-logs:
  1224  				// New log arrived, parse the event and forward to the user
  1225  				event := new(LendingpoolDeposit)
  1226  				if err := _Lendingpool.contract.UnpackLog(event, "Deposit", log); err != nil {
  1227  					return err
  1228  				}
  1229  				event.Raw = log
  1230  
  1231  				select {
  1232  				case sink <- event:
  1233  				case err := <-sub.Err():
  1234  					return err
  1235  				case <-quit:
  1236  					return nil
  1237  				}
  1238  			case err := <-sub.Err():
  1239  				return err
  1240  			case <-quit:
  1241  				return nil
  1242  			}
  1243  		}
  1244  	}), nil
  1245  }
  1246  
  1247  // ParseDeposit is a log parse operation binding the contract event 0xc12c57b1c73a2c3a2ea4613e9476abb3d8d146857aab7329e24243fb59710c82.
  1248  //
  1249  // Solidity: event Deposit(address indexed _reserve, address indexed _user, uint256 _amount, uint16 indexed _referral, uint256 _timestamp)
  1250  func (_Lendingpool *LendingpoolFilterer) ParseDeposit(log types.Log) (*LendingpoolDeposit, error) {
  1251  	event := new(LendingpoolDeposit)
  1252  	if err := _Lendingpool.contract.UnpackLog(event, "Deposit", log); err != nil {
  1253  		return nil, err
  1254  	}
  1255  	return event, nil
  1256  }
  1257  
  1258  // LendingpoolFlashLoanIterator is returned from FilterFlashLoan and is used to iterate over the raw logs and unpacked data for FlashLoan events raised by the Lendingpool contract.
  1259  type LendingpoolFlashLoanIterator struct {
  1260  	Event *LendingpoolFlashLoan // Event containing the contract specifics and raw log
  1261  
  1262  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1263  	event    string              // Event name to use for unpacking event data
  1264  
  1265  	logs chan types.Log        // Log channel receiving the found contract events
  1266  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1267  	done bool                  // Whether the subscription completed delivering logs
  1268  	fail error                 // Occurred error to stop iteration
  1269  }
  1270  
  1271  // Next advances the iterator to the subsequent event, returning whether there
  1272  // are any more events found. In case of a retrieval or parsing error, false is
  1273  // returned and Error() can be queried for the exact failure.
  1274  func (it *LendingpoolFlashLoanIterator) Next() bool {
  1275  	// If the iterator failed, stop iterating
  1276  	if it.fail != nil {
  1277  		return false
  1278  	}
  1279  	// If the iterator completed, deliver directly whatever's available
  1280  	if it.done {
  1281  		select {
  1282  		case log := <-it.logs:
  1283  			it.Event = new(LendingpoolFlashLoan)
  1284  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1285  				it.fail = err
  1286  				return false
  1287  			}
  1288  			it.Event.Raw = log
  1289  			return true
  1290  
  1291  		default:
  1292  			return false
  1293  		}
  1294  	}
  1295  	// Iterator still in progress, wait for either a data or an error event
  1296  	select {
  1297  	case log := <-it.logs:
  1298  		it.Event = new(LendingpoolFlashLoan)
  1299  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1300  			it.fail = err
  1301  			return false
  1302  		}
  1303  		it.Event.Raw = log
  1304  		return true
  1305  
  1306  	case err := <-it.sub.Err():
  1307  		it.done = true
  1308  		it.fail = err
  1309  		return it.Next()
  1310  	}
  1311  }
  1312  
  1313  // Error returns any retrieval or parsing error occurred during filtering.
  1314  func (it *LendingpoolFlashLoanIterator) Error() error {
  1315  	return it.fail
  1316  }
  1317  
  1318  // Close terminates the iteration process, releasing any pending underlying
  1319  // resources.
  1320  func (it *LendingpoolFlashLoanIterator) Close() error {
  1321  	it.sub.Unsubscribe()
  1322  	return nil
  1323  }
  1324  
  1325  // LendingpoolFlashLoan represents a FlashLoan event raised by the Lendingpool contract.
  1326  type LendingpoolFlashLoan struct {
  1327  	Target      common.Address
  1328  	Reserve     common.Address
  1329  	Amount      *big.Int
  1330  	TotalFee    *big.Int
  1331  	ProtocolFee *big.Int
  1332  	Timestamp   *big.Int
  1333  	Raw         types.Log // Blockchain specific contextual infos
  1334  }
  1335  
  1336  // FilterFlashLoan is a free log retrieval operation binding the contract event 0x5b8f46461c1dd69fb968f1a003acee221ea3e19540e350233b612ddb43433b55.
  1337  //
  1338  // Solidity: event FlashLoan(address indexed _target, address indexed _reserve, uint256 _amount, uint256 _totalFee, uint256 _protocolFee, uint256 _timestamp)
  1339  func (_Lendingpool *LendingpoolFilterer) FilterFlashLoan(opts *bind.FilterOpts, _target []common.Address, _reserve []common.Address) (*LendingpoolFlashLoanIterator, error) {
  1340  
  1341  	var _targetRule []interface{}
  1342  	for _, _targetItem := range _target {
  1343  		_targetRule = append(_targetRule, _targetItem)
  1344  	}
  1345  	var _reserveRule []interface{}
  1346  	for _, _reserveItem := range _reserve {
  1347  		_reserveRule = append(_reserveRule, _reserveItem)
  1348  	}
  1349  
  1350  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "FlashLoan", _targetRule, _reserveRule)
  1351  	if err != nil {
  1352  		return nil, err
  1353  	}
  1354  	return &LendingpoolFlashLoanIterator{contract: _Lendingpool.contract, event: "FlashLoan", logs: logs, sub: sub}, nil
  1355  }
  1356  
  1357  // WatchFlashLoan is a free log subscription operation binding the contract event 0x5b8f46461c1dd69fb968f1a003acee221ea3e19540e350233b612ddb43433b55.
  1358  //
  1359  // Solidity: event FlashLoan(address indexed _target, address indexed _reserve, uint256 _amount, uint256 _totalFee, uint256 _protocolFee, uint256 _timestamp)
  1360  func (_Lendingpool *LendingpoolFilterer) WatchFlashLoan(opts *bind.WatchOpts, sink chan<- *LendingpoolFlashLoan, _target []common.Address, _reserve []common.Address) (event.Subscription, error) {
  1361  
  1362  	var _targetRule []interface{}
  1363  	for _, _targetItem := range _target {
  1364  		_targetRule = append(_targetRule, _targetItem)
  1365  	}
  1366  	var _reserveRule []interface{}
  1367  	for _, _reserveItem := range _reserve {
  1368  		_reserveRule = append(_reserveRule, _reserveItem)
  1369  	}
  1370  
  1371  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "FlashLoan", _targetRule, _reserveRule)
  1372  	if err != nil {
  1373  		return nil, err
  1374  	}
  1375  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1376  		defer sub.Unsubscribe()
  1377  		for {
  1378  			select {
  1379  			case log := <-logs:
  1380  				// New log arrived, parse the event and forward to the user
  1381  				event := new(LendingpoolFlashLoan)
  1382  				if err := _Lendingpool.contract.UnpackLog(event, "FlashLoan", log); err != nil {
  1383  					return err
  1384  				}
  1385  				event.Raw = log
  1386  
  1387  				select {
  1388  				case sink <- event:
  1389  				case err := <-sub.Err():
  1390  					return err
  1391  				case <-quit:
  1392  					return nil
  1393  				}
  1394  			case err := <-sub.Err():
  1395  				return err
  1396  			case <-quit:
  1397  				return nil
  1398  			}
  1399  		}
  1400  	}), nil
  1401  }
  1402  
  1403  // ParseFlashLoan is a log parse operation binding the contract event 0x5b8f46461c1dd69fb968f1a003acee221ea3e19540e350233b612ddb43433b55.
  1404  //
  1405  // Solidity: event FlashLoan(address indexed _target, address indexed _reserve, uint256 _amount, uint256 _totalFee, uint256 _protocolFee, uint256 _timestamp)
  1406  func (_Lendingpool *LendingpoolFilterer) ParseFlashLoan(log types.Log) (*LendingpoolFlashLoan, error) {
  1407  	event := new(LendingpoolFlashLoan)
  1408  	if err := _Lendingpool.contract.UnpackLog(event, "FlashLoan", log); err != nil {
  1409  		return nil, err
  1410  	}
  1411  	return event, nil
  1412  }
  1413  
  1414  // LendingpoolLiquidationCallIterator is returned from FilterLiquidationCall and is used to iterate over the raw logs and unpacked data for LiquidationCall events raised by the Lendingpool contract.
  1415  type LendingpoolLiquidationCallIterator struct {
  1416  	Event *LendingpoolLiquidationCall // Event containing the contract specifics and raw log
  1417  
  1418  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1419  	event    string              // Event name to use for unpacking event data
  1420  
  1421  	logs chan types.Log        // Log channel receiving the found contract events
  1422  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1423  	done bool                  // Whether the subscription completed delivering logs
  1424  	fail error                 // Occurred error to stop iteration
  1425  }
  1426  
  1427  // Next advances the iterator to the subsequent event, returning whether there
  1428  // are any more events found. In case of a retrieval or parsing error, false is
  1429  // returned and Error() can be queried for the exact failure.
  1430  func (it *LendingpoolLiquidationCallIterator) Next() bool {
  1431  	// If the iterator failed, stop iterating
  1432  	if it.fail != nil {
  1433  		return false
  1434  	}
  1435  	// If the iterator completed, deliver directly whatever's available
  1436  	if it.done {
  1437  		select {
  1438  		case log := <-it.logs:
  1439  			it.Event = new(LendingpoolLiquidationCall)
  1440  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1441  				it.fail = err
  1442  				return false
  1443  			}
  1444  			it.Event.Raw = log
  1445  			return true
  1446  
  1447  		default:
  1448  			return false
  1449  		}
  1450  	}
  1451  	// Iterator still in progress, wait for either a data or an error event
  1452  	select {
  1453  	case log := <-it.logs:
  1454  		it.Event = new(LendingpoolLiquidationCall)
  1455  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1456  			it.fail = err
  1457  			return false
  1458  		}
  1459  		it.Event.Raw = log
  1460  		return true
  1461  
  1462  	case err := <-it.sub.Err():
  1463  		it.done = true
  1464  		it.fail = err
  1465  		return it.Next()
  1466  	}
  1467  }
  1468  
  1469  // Error returns any retrieval or parsing error occurred during filtering.
  1470  func (it *LendingpoolLiquidationCallIterator) Error() error {
  1471  	return it.fail
  1472  }
  1473  
  1474  // Close terminates the iteration process, releasing any pending underlying
  1475  // resources.
  1476  func (it *LendingpoolLiquidationCallIterator) Close() error {
  1477  	it.sub.Unsubscribe()
  1478  	return nil
  1479  }
  1480  
  1481  // LendingpoolLiquidationCall represents a LiquidationCall event raised by the Lendingpool contract.
  1482  type LendingpoolLiquidationCall struct {
  1483  	Collateral                 common.Address
  1484  	Reserve                    common.Address
  1485  	User                       common.Address
  1486  	PurchaseAmount             *big.Int
  1487  	LiquidatedCollateralAmount *big.Int
  1488  	AccruedBorrowInterest      *big.Int
  1489  	Liquidator                 common.Address
  1490  	ReceiveAToken              bool
  1491  	Timestamp                  *big.Int
  1492  	Raw                        types.Log // Blockchain specific contextual infos
  1493  }
  1494  
  1495  // FilterLiquidationCall is a free log retrieval operation binding the contract event 0x56864757fd5b1fc9f38f5f3a981cd8ae512ce41b902cf73fc506ee369c6bc237.
  1496  //
  1497  // Solidity: event LiquidationCall(address indexed _collateral, address indexed _reserve, address indexed _user, uint256 _purchaseAmount, uint256 _liquidatedCollateralAmount, uint256 _accruedBorrowInterest, address _liquidator, bool _receiveAToken, uint256 _timestamp)
  1498  func (_Lendingpool *LendingpoolFilterer) FilterLiquidationCall(opts *bind.FilterOpts, _collateral []common.Address, _reserve []common.Address, _user []common.Address) (*LendingpoolLiquidationCallIterator, error) {
  1499  
  1500  	var _collateralRule []interface{}
  1501  	for _, _collateralItem := range _collateral {
  1502  		_collateralRule = append(_collateralRule, _collateralItem)
  1503  	}
  1504  	var _reserveRule []interface{}
  1505  	for _, _reserveItem := range _reserve {
  1506  		_reserveRule = append(_reserveRule, _reserveItem)
  1507  	}
  1508  	var _userRule []interface{}
  1509  	for _, _userItem := range _user {
  1510  		_userRule = append(_userRule, _userItem)
  1511  	}
  1512  
  1513  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "LiquidationCall", _collateralRule, _reserveRule, _userRule)
  1514  	if err != nil {
  1515  		return nil, err
  1516  	}
  1517  	return &LendingpoolLiquidationCallIterator{contract: _Lendingpool.contract, event: "LiquidationCall", logs: logs, sub: sub}, nil
  1518  }
  1519  
  1520  // WatchLiquidationCall is a free log subscription operation binding the contract event 0x56864757fd5b1fc9f38f5f3a981cd8ae512ce41b902cf73fc506ee369c6bc237.
  1521  //
  1522  // Solidity: event LiquidationCall(address indexed _collateral, address indexed _reserve, address indexed _user, uint256 _purchaseAmount, uint256 _liquidatedCollateralAmount, uint256 _accruedBorrowInterest, address _liquidator, bool _receiveAToken, uint256 _timestamp)
  1523  func (_Lendingpool *LendingpoolFilterer) WatchLiquidationCall(opts *bind.WatchOpts, sink chan<- *LendingpoolLiquidationCall, _collateral []common.Address, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  1524  
  1525  	var _collateralRule []interface{}
  1526  	for _, _collateralItem := range _collateral {
  1527  		_collateralRule = append(_collateralRule, _collateralItem)
  1528  	}
  1529  	var _reserveRule []interface{}
  1530  	for _, _reserveItem := range _reserve {
  1531  		_reserveRule = append(_reserveRule, _reserveItem)
  1532  	}
  1533  	var _userRule []interface{}
  1534  	for _, _userItem := range _user {
  1535  		_userRule = append(_userRule, _userItem)
  1536  	}
  1537  
  1538  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "LiquidationCall", _collateralRule, _reserveRule, _userRule)
  1539  	if err != nil {
  1540  		return nil, err
  1541  	}
  1542  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1543  		defer sub.Unsubscribe()
  1544  		for {
  1545  			select {
  1546  			case log := <-logs:
  1547  				// New log arrived, parse the event and forward to the user
  1548  				event := new(LendingpoolLiquidationCall)
  1549  				if err := _Lendingpool.contract.UnpackLog(event, "LiquidationCall", log); err != nil {
  1550  					return err
  1551  				}
  1552  				event.Raw = log
  1553  
  1554  				select {
  1555  				case sink <- event:
  1556  				case err := <-sub.Err():
  1557  					return err
  1558  				case <-quit:
  1559  					return nil
  1560  				}
  1561  			case err := <-sub.Err():
  1562  				return err
  1563  			case <-quit:
  1564  				return nil
  1565  			}
  1566  		}
  1567  	}), nil
  1568  }
  1569  
  1570  // ParseLiquidationCall is a log parse operation binding the contract event 0x56864757fd5b1fc9f38f5f3a981cd8ae512ce41b902cf73fc506ee369c6bc237.
  1571  //
  1572  // Solidity: event LiquidationCall(address indexed _collateral, address indexed _reserve, address indexed _user, uint256 _purchaseAmount, uint256 _liquidatedCollateralAmount, uint256 _accruedBorrowInterest, address _liquidator, bool _receiveAToken, uint256 _timestamp)
  1573  func (_Lendingpool *LendingpoolFilterer) ParseLiquidationCall(log types.Log) (*LendingpoolLiquidationCall, error) {
  1574  	event := new(LendingpoolLiquidationCall)
  1575  	if err := _Lendingpool.contract.UnpackLog(event, "LiquidationCall", log); err != nil {
  1576  		return nil, err
  1577  	}
  1578  	return event, nil
  1579  }
  1580  
  1581  // LendingpoolOriginationFeeLiquidatedIterator is returned from FilterOriginationFeeLiquidated and is used to iterate over the raw logs and unpacked data for OriginationFeeLiquidated events raised by the Lendingpool contract.
  1582  type LendingpoolOriginationFeeLiquidatedIterator struct {
  1583  	Event *LendingpoolOriginationFeeLiquidated // Event containing the contract specifics and raw log
  1584  
  1585  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1586  	event    string              // Event name to use for unpacking event data
  1587  
  1588  	logs chan types.Log        // Log channel receiving the found contract events
  1589  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1590  	done bool                  // Whether the subscription completed delivering logs
  1591  	fail error                 // Occurred error to stop iteration
  1592  }
  1593  
  1594  // Next advances the iterator to the subsequent event, returning whether there
  1595  // are any more events found. In case of a retrieval or parsing error, false is
  1596  // returned and Error() can be queried for the exact failure.
  1597  func (it *LendingpoolOriginationFeeLiquidatedIterator) Next() bool {
  1598  	// If the iterator failed, stop iterating
  1599  	if it.fail != nil {
  1600  		return false
  1601  	}
  1602  	// If the iterator completed, deliver directly whatever's available
  1603  	if it.done {
  1604  		select {
  1605  		case log := <-it.logs:
  1606  			it.Event = new(LendingpoolOriginationFeeLiquidated)
  1607  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1608  				it.fail = err
  1609  				return false
  1610  			}
  1611  			it.Event.Raw = log
  1612  			return true
  1613  
  1614  		default:
  1615  			return false
  1616  		}
  1617  	}
  1618  	// Iterator still in progress, wait for either a data or an error event
  1619  	select {
  1620  	case log := <-it.logs:
  1621  		it.Event = new(LendingpoolOriginationFeeLiquidated)
  1622  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1623  			it.fail = err
  1624  			return false
  1625  		}
  1626  		it.Event.Raw = log
  1627  		return true
  1628  
  1629  	case err := <-it.sub.Err():
  1630  		it.done = true
  1631  		it.fail = err
  1632  		return it.Next()
  1633  	}
  1634  }
  1635  
  1636  // Error returns any retrieval or parsing error occurred during filtering.
  1637  func (it *LendingpoolOriginationFeeLiquidatedIterator) Error() error {
  1638  	return it.fail
  1639  }
  1640  
  1641  // Close terminates the iteration process, releasing any pending underlying
  1642  // resources.
  1643  func (it *LendingpoolOriginationFeeLiquidatedIterator) Close() error {
  1644  	it.sub.Unsubscribe()
  1645  	return nil
  1646  }
  1647  
  1648  // LendingpoolOriginationFeeLiquidated represents a OriginationFeeLiquidated event raised by the Lendingpool contract.
  1649  type LendingpoolOriginationFeeLiquidated struct {
  1650  	Collateral                 common.Address
  1651  	Reserve                    common.Address
  1652  	User                       common.Address
  1653  	FeeLiquidated              *big.Int
  1654  	LiquidatedCollateralForFee *big.Int
  1655  	Timestamp                  *big.Int
  1656  	Raw                        types.Log // Blockchain specific contextual infos
  1657  }
  1658  
  1659  // FilterOriginationFeeLiquidated is a free log retrieval operation binding the contract event 0x36ca8b16d61dc13b1062adff83e3778ab92d14f9e35bfe9fd1283e02b13fb0a1.
  1660  //
  1661  // Solidity: event OriginationFeeLiquidated(address indexed _collateral, address indexed _reserve, address indexed _user, uint256 _feeLiquidated, uint256 _liquidatedCollateralForFee, uint256 _timestamp)
  1662  func (_Lendingpool *LendingpoolFilterer) FilterOriginationFeeLiquidated(opts *bind.FilterOpts, _collateral []common.Address, _reserve []common.Address, _user []common.Address) (*LendingpoolOriginationFeeLiquidatedIterator, error) {
  1663  
  1664  	var _collateralRule []interface{}
  1665  	for _, _collateralItem := range _collateral {
  1666  		_collateralRule = append(_collateralRule, _collateralItem)
  1667  	}
  1668  	var _reserveRule []interface{}
  1669  	for _, _reserveItem := range _reserve {
  1670  		_reserveRule = append(_reserveRule, _reserveItem)
  1671  	}
  1672  	var _userRule []interface{}
  1673  	for _, _userItem := range _user {
  1674  		_userRule = append(_userRule, _userItem)
  1675  	}
  1676  
  1677  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "OriginationFeeLiquidated", _collateralRule, _reserveRule, _userRule)
  1678  	if err != nil {
  1679  		return nil, err
  1680  	}
  1681  	return &LendingpoolOriginationFeeLiquidatedIterator{contract: _Lendingpool.contract, event: "OriginationFeeLiquidated", logs: logs, sub: sub}, nil
  1682  }
  1683  
  1684  // WatchOriginationFeeLiquidated is a free log subscription operation binding the contract event 0x36ca8b16d61dc13b1062adff83e3778ab92d14f9e35bfe9fd1283e02b13fb0a1.
  1685  //
  1686  // Solidity: event OriginationFeeLiquidated(address indexed _collateral, address indexed _reserve, address indexed _user, uint256 _feeLiquidated, uint256 _liquidatedCollateralForFee, uint256 _timestamp)
  1687  func (_Lendingpool *LendingpoolFilterer) WatchOriginationFeeLiquidated(opts *bind.WatchOpts, sink chan<- *LendingpoolOriginationFeeLiquidated, _collateral []common.Address, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  1688  
  1689  	var _collateralRule []interface{}
  1690  	for _, _collateralItem := range _collateral {
  1691  		_collateralRule = append(_collateralRule, _collateralItem)
  1692  	}
  1693  	var _reserveRule []interface{}
  1694  	for _, _reserveItem := range _reserve {
  1695  		_reserveRule = append(_reserveRule, _reserveItem)
  1696  	}
  1697  	var _userRule []interface{}
  1698  	for _, _userItem := range _user {
  1699  		_userRule = append(_userRule, _userItem)
  1700  	}
  1701  
  1702  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "OriginationFeeLiquidated", _collateralRule, _reserveRule, _userRule)
  1703  	if err != nil {
  1704  		return nil, err
  1705  	}
  1706  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1707  		defer sub.Unsubscribe()
  1708  		for {
  1709  			select {
  1710  			case log := <-logs:
  1711  				// New log arrived, parse the event and forward to the user
  1712  				event := new(LendingpoolOriginationFeeLiquidated)
  1713  				if err := _Lendingpool.contract.UnpackLog(event, "OriginationFeeLiquidated", log); err != nil {
  1714  					return err
  1715  				}
  1716  				event.Raw = log
  1717  
  1718  				select {
  1719  				case sink <- event:
  1720  				case err := <-sub.Err():
  1721  					return err
  1722  				case <-quit:
  1723  					return nil
  1724  				}
  1725  			case err := <-sub.Err():
  1726  				return err
  1727  			case <-quit:
  1728  				return nil
  1729  			}
  1730  		}
  1731  	}), nil
  1732  }
  1733  
  1734  // ParseOriginationFeeLiquidated is a log parse operation binding the contract event 0x36ca8b16d61dc13b1062adff83e3778ab92d14f9e35bfe9fd1283e02b13fb0a1.
  1735  //
  1736  // Solidity: event OriginationFeeLiquidated(address indexed _collateral, address indexed _reserve, address indexed _user, uint256 _feeLiquidated, uint256 _liquidatedCollateralForFee, uint256 _timestamp)
  1737  func (_Lendingpool *LendingpoolFilterer) ParseOriginationFeeLiquidated(log types.Log) (*LendingpoolOriginationFeeLiquidated, error) {
  1738  	event := new(LendingpoolOriginationFeeLiquidated)
  1739  	if err := _Lendingpool.contract.UnpackLog(event, "OriginationFeeLiquidated", log); err != nil {
  1740  		return nil, err
  1741  	}
  1742  	return event, nil
  1743  }
  1744  
  1745  // LendingpoolRebalanceStableBorrowRateIterator is returned from FilterRebalanceStableBorrowRate and is used to iterate over the raw logs and unpacked data for RebalanceStableBorrowRate events raised by the Lendingpool contract.
  1746  type LendingpoolRebalanceStableBorrowRateIterator struct {
  1747  	Event *LendingpoolRebalanceStableBorrowRate // Event containing the contract specifics and raw log
  1748  
  1749  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1750  	event    string              // Event name to use for unpacking event data
  1751  
  1752  	logs chan types.Log        // Log channel receiving the found contract events
  1753  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1754  	done bool                  // Whether the subscription completed delivering logs
  1755  	fail error                 // Occurred error to stop iteration
  1756  }
  1757  
  1758  // Next advances the iterator to the subsequent event, returning whether there
  1759  // are any more events found. In case of a retrieval or parsing error, false is
  1760  // returned and Error() can be queried for the exact failure.
  1761  func (it *LendingpoolRebalanceStableBorrowRateIterator) Next() bool {
  1762  	// If the iterator failed, stop iterating
  1763  	if it.fail != nil {
  1764  		return false
  1765  	}
  1766  	// If the iterator completed, deliver directly whatever's available
  1767  	if it.done {
  1768  		select {
  1769  		case log := <-it.logs:
  1770  			it.Event = new(LendingpoolRebalanceStableBorrowRate)
  1771  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1772  				it.fail = err
  1773  				return false
  1774  			}
  1775  			it.Event.Raw = log
  1776  			return true
  1777  
  1778  		default:
  1779  			return false
  1780  		}
  1781  	}
  1782  	// Iterator still in progress, wait for either a data or an error event
  1783  	select {
  1784  	case log := <-it.logs:
  1785  		it.Event = new(LendingpoolRebalanceStableBorrowRate)
  1786  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1787  			it.fail = err
  1788  			return false
  1789  		}
  1790  		it.Event.Raw = log
  1791  		return true
  1792  
  1793  	case err := <-it.sub.Err():
  1794  		it.done = true
  1795  		it.fail = err
  1796  		return it.Next()
  1797  	}
  1798  }
  1799  
  1800  // Error returns any retrieval or parsing error occurred during filtering.
  1801  func (it *LendingpoolRebalanceStableBorrowRateIterator) Error() error {
  1802  	return it.fail
  1803  }
  1804  
  1805  // Close terminates the iteration process, releasing any pending underlying
  1806  // resources.
  1807  func (it *LendingpoolRebalanceStableBorrowRateIterator) Close() error {
  1808  	it.sub.Unsubscribe()
  1809  	return nil
  1810  }
  1811  
  1812  // LendingpoolRebalanceStableBorrowRate represents a RebalanceStableBorrowRate event raised by the Lendingpool contract.
  1813  type LendingpoolRebalanceStableBorrowRate struct {
  1814  	Reserve               common.Address
  1815  	User                  common.Address
  1816  	NewStableRate         *big.Int
  1817  	BorrowBalanceIncrease *big.Int
  1818  	Timestamp             *big.Int
  1819  	Raw                   types.Log // Blockchain specific contextual infos
  1820  }
  1821  
  1822  // FilterRebalanceStableBorrowRate is a free log retrieval operation binding the contract event 0x5050ad184862424ee0852d1838d355ad65bed1e5e6da67ac9a2dac1922677f60.
  1823  //
  1824  // Solidity: event RebalanceStableBorrowRate(address indexed _reserve, address indexed _user, uint256 _newStableRate, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  1825  func (_Lendingpool *LendingpoolFilterer) FilterRebalanceStableBorrowRate(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address) (*LendingpoolRebalanceStableBorrowRateIterator, error) {
  1826  
  1827  	var _reserveRule []interface{}
  1828  	for _, _reserveItem := range _reserve {
  1829  		_reserveRule = append(_reserveRule, _reserveItem)
  1830  	}
  1831  	var _userRule []interface{}
  1832  	for _, _userItem := range _user {
  1833  		_userRule = append(_userRule, _userItem)
  1834  	}
  1835  
  1836  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "RebalanceStableBorrowRate", _reserveRule, _userRule)
  1837  	if err != nil {
  1838  		return nil, err
  1839  	}
  1840  	return &LendingpoolRebalanceStableBorrowRateIterator{contract: _Lendingpool.contract, event: "RebalanceStableBorrowRate", logs: logs, sub: sub}, nil
  1841  }
  1842  
  1843  // WatchRebalanceStableBorrowRate is a free log subscription operation binding the contract event 0x5050ad184862424ee0852d1838d355ad65bed1e5e6da67ac9a2dac1922677f60.
  1844  //
  1845  // Solidity: event RebalanceStableBorrowRate(address indexed _reserve, address indexed _user, uint256 _newStableRate, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  1846  func (_Lendingpool *LendingpoolFilterer) WatchRebalanceStableBorrowRate(opts *bind.WatchOpts, sink chan<- *LendingpoolRebalanceStableBorrowRate, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  1847  
  1848  	var _reserveRule []interface{}
  1849  	for _, _reserveItem := range _reserve {
  1850  		_reserveRule = append(_reserveRule, _reserveItem)
  1851  	}
  1852  	var _userRule []interface{}
  1853  	for _, _userItem := range _user {
  1854  		_userRule = append(_userRule, _userItem)
  1855  	}
  1856  
  1857  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "RebalanceStableBorrowRate", _reserveRule, _userRule)
  1858  	if err != nil {
  1859  		return nil, err
  1860  	}
  1861  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1862  		defer sub.Unsubscribe()
  1863  		for {
  1864  			select {
  1865  			case log := <-logs:
  1866  				// New log arrived, parse the event and forward to the user
  1867  				event := new(LendingpoolRebalanceStableBorrowRate)
  1868  				if err := _Lendingpool.contract.UnpackLog(event, "RebalanceStableBorrowRate", log); err != nil {
  1869  					return err
  1870  				}
  1871  				event.Raw = log
  1872  
  1873  				select {
  1874  				case sink <- event:
  1875  				case err := <-sub.Err():
  1876  					return err
  1877  				case <-quit:
  1878  					return nil
  1879  				}
  1880  			case err := <-sub.Err():
  1881  				return err
  1882  			case <-quit:
  1883  				return nil
  1884  			}
  1885  		}
  1886  	}), nil
  1887  }
  1888  
  1889  // ParseRebalanceStableBorrowRate is a log parse operation binding the contract event 0x5050ad184862424ee0852d1838d355ad65bed1e5e6da67ac9a2dac1922677f60.
  1890  //
  1891  // Solidity: event RebalanceStableBorrowRate(address indexed _reserve, address indexed _user, uint256 _newStableRate, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  1892  func (_Lendingpool *LendingpoolFilterer) ParseRebalanceStableBorrowRate(log types.Log) (*LendingpoolRebalanceStableBorrowRate, error) {
  1893  	event := new(LendingpoolRebalanceStableBorrowRate)
  1894  	if err := _Lendingpool.contract.UnpackLog(event, "RebalanceStableBorrowRate", log); err != nil {
  1895  		return nil, err
  1896  	}
  1897  	return event, nil
  1898  }
  1899  
  1900  // LendingpoolRedeemUnderlyingIterator is returned from FilterRedeemUnderlying and is used to iterate over the raw logs and unpacked data for RedeemUnderlying events raised by the Lendingpool contract.
  1901  type LendingpoolRedeemUnderlyingIterator struct {
  1902  	Event *LendingpoolRedeemUnderlying // Event containing the contract specifics and raw log
  1903  
  1904  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1905  	event    string              // Event name to use for unpacking event data
  1906  
  1907  	logs chan types.Log        // Log channel receiving the found contract events
  1908  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1909  	done bool                  // Whether the subscription completed delivering logs
  1910  	fail error                 // Occurred error to stop iteration
  1911  }
  1912  
  1913  // Next advances the iterator to the subsequent event, returning whether there
  1914  // are any more events found. In case of a retrieval or parsing error, false is
  1915  // returned and Error() can be queried for the exact failure.
  1916  func (it *LendingpoolRedeemUnderlyingIterator) Next() bool {
  1917  	// If the iterator failed, stop iterating
  1918  	if it.fail != nil {
  1919  		return false
  1920  	}
  1921  	// If the iterator completed, deliver directly whatever's available
  1922  	if it.done {
  1923  		select {
  1924  		case log := <-it.logs:
  1925  			it.Event = new(LendingpoolRedeemUnderlying)
  1926  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1927  				it.fail = err
  1928  				return false
  1929  			}
  1930  			it.Event.Raw = log
  1931  			return true
  1932  
  1933  		default:
  1934  			return false
  1935  		}
  1936  	}
  1937  	// Iterator still in progress, wait for either a data or an error event
  1938  	select {
  1939  	case log := <-it.logs:
  1940  		it.Event = new(LendingpoolRedeemUnderlying)
  1941  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1942  			it.fail = err
  1943  			return false
  1944  		}
  1945  		it.Event.Raw = log
  1946  		return true
  1947  
  1948  	case err := <-it.sub.Err():
  1949  		it.done = true
  1950  		it.fail = err
  1951  		return it.Next()
  1952  	}
  1953  }
  1954  
  1955  // Error returns any retrieval or parsing error occurred during filtering.
  1956  func (it *LendingpoolRedeemUnderlyingIterator) Error() error {
  1957  	return it.fail
  1958  }
  1959  
  1960  // Close terminates the iteration process, releasing any pending underlying
  1961  // resources.
  1962  func (it *LendingpoolRedeemUnderlyingIterator) Close() error {
  1963  	it.sub.Unsubscribe()
  1964  	return nil
  1965  }
  1966  
  1967  // LendingpoolRedeemUnderlying represents a RedeemUnderlying event raised by the Lendingpool contract.
  1968  type LendingpoolRedeemUnderlying struct {
  1969  	Reserve   common.Address
  1970  	User      common.Address
  1971  	Amount    *big.Int
  1972  	Timestamp *big.Int
  1973  	Raw       types.Log // Blockchain specific contextual infos
  1974  }
  1975  
  1976  // FilterRedeemUnderlying is a free log retrieval operation binding the contract event 0x9c4ed599cd8555b9c1e8cd7643240d7d71eb76b792948c49fcb4d411f7b6b3c6.
  1977  //
  1978  // Solidity: event RedeemUnderlying(address indexed _reserve, address indexed _user, uint256 _amount, uint256 _timestamp)
  1979  func (_Lendingpool *LendingpoolFilterer) FilterRedeemUnderlying(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address) (*LendingpoolRedeemUnderlyingIterator, error) {
  1980  
  1981  	var _reserveRule []interface{}
  1982  	for _, _reserveItem := range _reserve {
  1983  		_reserveRule = append(_reserveRule, _reserveItem)
  1984  	}
  1985  	var _userRule []interface{}
  1986  	for _, _userItem := range _user {
  1987  		_userRule = append(_userRule, _userItem)
  1988  	}
  1989  
  1990  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "RedeemUnderlying", _reserveRule, _userRule)
  1991  	if err != nil {
  1992  		return nil, err
  1993  	}
  1994  	return &LendingpoolRedeemUnderlyingIterator{contract: _Lendingpool.contract, event: "RedeemUnderlying", logs: logs, sub: sub}, nil
  1995  }
  1996  
  1997  // WatchRedeemUnderlying is a free log subscription operation binding the contract event 0x9c4ed599cd8555b9c1e8cd7643240d7d71eb76b792948c49fcb4d411f7b6b3c6.
  1998  //
  1999  // Solidity: event RedeemUnderlying(address indexed _reserve, address indexed _user, uint256 _amount, uint256 _timestamp)
  2000  func (_Lendingpool *LendingpoolFilterer) WatchRedeemUnderlying(opts *bind.WatchOpts, sink chan<- *LendingpoolRedeemUnderlying, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  2001  
  2002  	var _reserveRule []interface{}
  2003  	for _, _reserveItem := range _reserve {
  2004  		_reserveRule = append(_reserveRule, _reserveItem)
  2005  	}
  2006  	var _userRule []interface{}
  2007  	for _, _userItem := range _user {
  2008  		_userRule = append(_userRule, _userItem)
  2009  	}
  2010  
  2011  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "RedeemUnderlying", _reserveRule, _userRule)
  2012  	if err != nil {
  2013  		return nil, err
  2014  	}
  2015  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2016  		defer sub.Unsubscribe()
  2017  		for {
  2018  			select {
  2019  			case log := <-logs:
  2020  				// New log arrived, parse the event and forward to the user
  2021  				event := new(LendingpoolRedeemUnderlying)
  2022  				if err := _Lendingpool.contract.UnpackLog(event, "RedeemUnderlying", log); err != nil {
  2023  					return err
  2024  				}
  2025  				event.Raw = log
  2026  
  2027  				select {
  2028  				case sink <- event:
  2029  				case err := <-sub.Err():
  2030  					return err
  2031  				case <-quit:
  2032  					return nil
  2033  				}
  2034  			case err := <-sub.Err():
  2035  				return err
  2036  			case <-quit:
  2037  				return nil
  2038  			}
  2039  		}
  2040  	}), nil
  2041  }
  2042  
  2043  // ParseRedeemUnderlying is a log parse operation binding the contract event 0x9c4ed599cd8555b9c1e8cd7643240d7d71eb76b792948c49fcb4d411f7b6b3c6.
  2044  //
  2045  // Solidity: event RedeemUnderlying(address indexed _reserve, address indexed _user, uint256 _amount, uint256 _timestamp)
  2046  func (_Lendingpool *LendingpoolFilterer) ParseRedeemUnderlying(log types.Log) (*LendingpoolRedeemUnderlying, error) {
  2047  	event := new(LendingpoolRedeemUnderlying)
  2048  	if err := _Lendingpool.contract.UnpackLog(event, "RedeemUnderlying", log); err != nil {
  2049  		return nil, err
  2050  	}
  2051  	return event, nil
  2052  }
  2053  
  2054  // LendingpoolRepayIterator is returned from FilterRepay and is used to iterate over the raw logs and unpacked data for Repay events raised by the Lendingpool contract.
  2055  type LendingpoolRepayIterator struct {
  2056  	Event *LendingpoolRepay // Event containing the contract specifics and raw log
  2057  
  2058  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2059  	event    string              // Event name to use for unpacking event data
  2060  
  2061  	logs chan types.Log        // Log channel receiving the found contract events
  2062  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2063  	done bool                  // Whether the subscription completed delivering logs
  2064  	fail error                 // Occurred error to stop iteration
  2065  }
  2066  
  2067  // Next advances the iterator to the subsequent event, returning whether there
  2068  // are any more events found. In case of a retrieval or parsing error, false is
  2069  // returned and Error() can be queried for the exact failure.
  2070  func (it *LendingpoolRepayIterator) Next() bool {
  2071  	// If the iterator failed, stop iterating
  2072  	if it.fail != nil {
  2073  		return false
  2074  	}
  2075  	// If the iterator completed, deliver directly whatever's available
  2076  	if it.done {
  2077  		select {
  2078  		case log := <-it.logs:
  2079  			it.Event = new(LendingpoolRepay)
  2080  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2081  				it.fail = err
  2082  				return false
  2083  			}
  2084  			it.Event.Raw = log
  2085  			return true
  2086  
  2087  		default:
  2088  			return false
  2089  		}
  2090  	}
  2091  	// Iterator still in progress, wait for either a data or an error event
  2092  	select {
  2093  	case log := <-it.logs:
  2094  		it.Event = new(LendingpoolRepay)
  2095  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2096  			it.fail = err
  2097  			return false
  2098  		}
  2099  		it.Event.Raw = log
  2100  		return true
  2101  
  2102  	case err := <-it.sub.Err():
  2103  		it.done = true
  2104  		it.fail = err
  2105  		return it.Next()
  2106  	}
  2107  }
  2108  
  2109  // Error returns any retrieval or parsing error occurred during filtering.
  2110  func (it *LendingpoolRepayIterator) Error() error {
  2111  	return it.fail
  2112  }
  2113  
  2114  // Close terminates the iteration process, releasing any pending underlying
  2115  // resources.
  2116  func (it *LendingpoolRepayIterator) Close() error {
  2117  	it.sub.Unsubscribe()
  2118  	return nil
  2119  }
  2120  
  2121  // LendingpoolRepay represents a Repay event raised by the Lendingpool contract.
  2122  type LendingpoolRepay struct {
  2123  	Reserve               common.Address
  2124  	User                  common.Address
  2125  	Repayer               common.Address
  2126  	AmountMinusFees       *big.Int
  2127  	Fees                  *big.Int
  2128  	BorrowBalanceIncrease *big.Int
  2129  	Timestamp             *big.Int
  2130  	Raw                   types.Log // Blockchain specific contextual infos
  2131  }
  2132  
  2133  // FilterRepay is a free log retrieval operation binding the contract event 0xb718f0b14f03d8c3adf35b15e3da52421b042ac879e5a689011a8b1e0036773d.
  2134  //
  2135  // Solidity: event Repay(address indexed _reserve, address indexed _user, address indexed _repayer, uint256 _amountMinusFees, uint256 _fees, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  2136  func (_Lendingpool *LendingpoolFilterer) FilterRepay(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address, _repayer []common.Address) (*LendingpoolRepayIterator, error) {
  2137  
  2138  	var _reserveRule []interface{}
  2139  	for _, _reserveItem := range _reserve {
  2140  		_reserveRule = append(_reserveRule, _reserveItem)
  2141  	}
  2142  	var _userRule []interface{}
  2143  	for _, _userItem := range _user {
  2144  		_userRule = append(_userRule, _userItem)
  2145  	}
  2146  	var _repayerRule []interface{}
  2147  	for _, _repayerItem := range _repayer {
  2148  		_repayerRule = append(_repayerRule, _repayerItem)
  2149  	}
  2150  
  2151  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "Repay", _reserveRule, _userRule, _repayerRule)
  2152  	if err != nil {
  2153  		return nil, err
  2154  	}
  2155  	return &LendingpoolRepayIterator{contract: _Lendingpool.contract, event: "Repay", logs: logs, sub: sub}, nil
  2156  }
  2157  
  2158  // WatchRepay is a free log subscription operation binding the contract event 0xb718f0b14f03d8c3adf35b15e3da52421b042ac879e5a689011a8b1e0036773d.
  2159  //
  2160  // Solidity: event Repay(address indexed _reserve, address indexed _user, address indexed _repayer, uint256 _amountMinusFees, uint256 _fees, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  2161  func (_Lendingpool *LendingpoolFilterer) WatchRepay(opts *bind.WatchOpts, sink chan<- *LendingpoolRepay, _reserve []common.Address, _user []common.Address, _repayer []common.Address) (event.Subscription, error) {
  2162  
  2163  	var _reserveRule []interface{}
  2164  	for _, _reserveItem := range _reserve {
  2165  		_reserveRule = append(_reserveRule, _reserveItem)
  2166  	}
  2167  	var _userRule []interface{}
  2168  	for _, _userItem := range _user {
  2169  		_userRule = append(_userRule, _userItem)
  2170  	}
  2171  	var _repayerRule []interface{}
  2172  	for _, _repayerItem := range _repayer {
  2173  		_repayerRule = append(_repayerRule, _repayerItem)
  2174  	}
  2175  
  2176  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "Repay", _reserveRule, _userRule, _repayerRule)
  2177  	if err != nil {
  2178  		return nil, err
  2179  	}
  2180  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2181  		defer sub.Unsubscribe()
  2182  		for {
  2183  			select {
  2184  			case log := <-logs:
  2185  				// New log arrived, parse the event and forward to the user
  2186  				event := new(LendingpoolRepay)
  2187  				if err := _Lendingpool.contract.UnpackLog(event, "Repay", log); err != nil {
  2188  					return err
  2189  				}
  2190  				event.Raw = log
  2191  
  2192  				select {
  2193  				case sink <- event:
  2194  				case err := <-sub.Err():
  2195  					return err
  2196  				case <-quit:
  2197  					return nil
  2198  				}
  2199  			case err := <-sub.Err():
  2200  				return err
  2201  			case <-quit:
  2202  				return nil
  2203  			}
  2204  		}
  2205  	}), nil
  2206  }
  2207  
  2208  // ParseRepay is a log parse operation binding the contract event 0xb718f0b14f03d8c3adf35b15e3da52421b042ac879e5a689011a8b1e0036773d.
  2209  //
  2210  // Solidity: event Repay(address indexed _reserve, address indexed _user, address indexed _repayer, uint256 _amountMinusFees, uint256 _fees, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  2211  func (_Lendingpool *LendingpoolFilterer) ParseRepay(log types.Log) (*LendingpoolRepay, error) {
  2212  	event := new(LendingpoolRepay)
  2213  	if err := _Lendingpool.contract.UnpackLog(event, "Repay", log); err != nil {
  2214  		return nil, err
  2215  	}
  2216  	return event, nil
  2217  }
  2218  
  2219  // LendingpoolReserveUsedAsCollateralDisabledIterator is returned from FilterReserveUsedAsCollateralDisabled and is used to iterate over the raw logs and unpacked data for ReserveUsedAsCollateralDisabled events raised by the Lendingpool contract.
  2220  type LendingpoolReserveUsedAsCollateralDisabledIterator struct {
  2221  	Event *LendingpoolReserveUsedAsCollateralDisabled // Event containing the contract specifics and raw log
  2222  
  2223  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2224  	event    string              // Event name to use for unpacking event data
  2225  
  2226  	logs chan types.Log        // Log channel receiving the found contract events
  2227  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2228  	done bool                  // Whether the subscription completed delivering logs
  2229  	fail error                 // Occurred error to stop iteration
  2230  }
  2231  
  2232  // Next advances the iterator to the subsequent event, returning whether there
  2233  // are any more events found. In case of a retrieval or parsing error, false is
  2234  // returned and Error() can be queried for the exact failure.
  2235  func (it *LendingpoolReserveUsedAsCollateralDisabledIterator) Next() bool {
  2236  	// If the iterator failed, stop iterating
  2237  	if it.fail != nil {
  2238  		return false
  2239  	}
  2240  	// If the iterator completed, deliver directly whatever's available
  2241  	if it.done {
  2242  		select {
  2243  		case log := <-it.logs:
  2244  			it.Event = new(LendingpoolReserveUsedAsCollateralDisabled)
  2245  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2246  				it.fail = err
  2247  				return false
  2248  			}
  2249  			it.Event.Raw = log
  2250  			return true
  2251  
  2252  		default:
  2253  			return false
  2254  		}
  2255  	}
  2256  	// Iterator still in progress, wait for either a data or an error event
  2257  	select {
  2258  	case log := <-it.logs:
  2259  		it.Event = new(LendingpoolReserveUsedAsCollateralDisabled)
  2260  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2261  			it.fail = err
  2262  			return false
  2263  		}
  2264  		it.Event.Raw = log
  2265  		return true
  2266  
  2267  	case err := <-it.sub.Err():
  2268  		it.done = true
  2269  		it.fail = err
  2270  		return it.Next()
  2271  	}
  2272  }
  2273  
  2274  // Error returns any retrieval or parsing error occurred during filtering.
  2275  func (it *LendingpoolReserveUsedAsCollateralDisabledIterator) Error() error {
  2276  	return it.fail
  2277  }
  2278  
  2279  // Close terminates the iteration process, releasing any pending underlying
  2280  // resources.
  2281  func (it *LendingpoolReserveUsedAsCollateralDisabledIterator) Close() error {
  2282  	it.sub.Unsubscribe()
  2283  	return nil
  2284  }
  2285  
  2286  // LendingpoolReserveUsedAsCollateralDisabled represents a ReserveUsedAsCollateralDisabled event raised by the Lendingpool contract.
  2287  type LendingpoolReserveUsedAsCollateralDisabled struct {
  2288  	Reserve common.Address
  2289  	User    common.Address
  2290  	Raw     types.Log // Blockchain specific contextual infos
  2291  }
  2292  
  2293  // FilterReserveUsedAsCollateralDisabled is a free log retrieval operation binding the contract event 0x44c58d81365b66dd4b1a7f36c25aa97b8c71c361ee4937adc1a00000227db5dd.
  2294  //
  2295  // Solidity: event ReserveUsedAsCollateralDisabled(address indexed _reserve, address indexed _user)
  2296  func (_Lendingpool *LendingpoolFilterer) FilterReserveUsedAsCollateralDisabled(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address) (*LendingpoolReserveUsedAsCollateralDisabledIterator, error) {
  2297  
  2298  	var _reserveRule []interface{}
  2299  	for _, _reserveItem := range _reserve {
  2300  		_reserveRule = append(_reserveRule, _reserveItem)
  2301  	}
  2302  	var _userRule []interface{}
  2303  	for _, _userItem := range _user {
  2304  		_userRule = append(_userRule, _userItem)
  2305  	}
  2306  
  2307  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "ReserveUsedAsCollateralDisabled", _reserveRule, _userRule)
  2308  	if err != nil {
  2309  		return nil, err
  2310  	}
  2311  	return &LendingpoolReserveUsedAsCollateralDisabledIterator{contract: _Lendingpool.contract, event: "ReserveUsedAsCollateralDisabled", logs: logs, sub: sub}, nil
  2312  }
  2313  
  2314  // WatchReserveUsedAsCollateralDisabled is a free log subscription operation binding the contract event 0x44c58d81365b66dd4b1a7f36c25aa97b8c71c361ee4937adc1a00000227db5dd.
  2315  //
  2316  // Solidity: event ReserveUsedAsCollateralDisabled(address indexed _reserve, address indexed _user)
  2317  func (_Lendingpool *LendingpoolFilterer) WatchReserveUsedAsCollateralDisabled(opts *bind.WatchOpts, sink chan<- *LendingpoolReserveUsedAsCollateralDisabled, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  2318  
  2319  	var _reserveRule []interface{}
  2320  	for _, _reserveItem := range _reserve {
  2321  		_reserveRule = append(_reserveRule, _reserveItem)
  2322  	}
  2323  	var _userRule []interface{}
  2324  	for _, _userItem := range _user {
  2325  		_userRule = append(_userRule, _userItem)
  2326  	}
  2327  
  2328  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "ReserveUsedAsCollateralDisabled", _reserveRule, _userRule)
  2329  	if err != nil {
  2330  		return nil, err
  2331  	}
  2332  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2333  		defer sub.Unsubscribe()
  2334  		for {
  2335  			select {
  2336  			case log := <-logs:
  2337  				// New log arrived, parse the event and forward to the user
  2338  				event := new(LendingpoolReserveUsedAsCollateralDisabled)
  2339  				if err := _Lendingpool.contract.UnpackLog(event, "ReserveUsedAsCollateralDisabled", log); err != nil {
  2340  					return err
  2341  				}
  2342  				event.Raw = log
  2343  
  2344  				select {
  2345  				case sink <- event:
  2346  				case err := <-sub.Err():
  2347  					return err
  2348  				case <-quit:
  2349  					return nil
  2350  				}
  2351  			case err := <-sub.Err():
  2352  				return err
  2353  			case <-quit:
  2354  				return nil
  2355  			}
  2356  		}
  2357  	}), nil
  2358  }
  2359  
  2360  // ParseReserveUsedAsCollateralDisabled is a log parse operation binding the contract event 0x44c58d81365b66dd4b1a7f36c25aa97b8c71c361ee4937adc1a00000227db5dd.
  2361  //
  2362  // Solidity: event ReserveUsedAsCollateralDisabled(address indexed _reserve, address indexed _user)
  2363  func (_Lendingpool *LendingpoolFilterer) ParseReserveUsedAsCollateralDisabled(log types.Log) (*LendingpoolReserveUsedAsCollateralDisabled, error) {
  2364  	event := new(LendingpoolReserveUsedAsCollateralDisabled)
  2365  	if err := _Lendingpool.contract.UnpackLog(event, "ReserveUsedAsCollateralDisabled", log); err != nil {
  2366  		return nil, err
  2367  	}
  2368  	return event, nil
  2369  }
  2370  
  2371  // LendingpoolReserveUsedAsCollateralEnabledIterator is returned from FilterReserveUsedAsCollateralEnabled and is used to iterate over the raw logs and unpacked data for ReserveUsedAsCollateralEnabled events raised by the Lendingpool contract.
  2372  type LendingpoolReserveUsedAsCollateralEnabledIterator struct {
  2373  	Event *LendingpoolReserveUsedAsCollateralEnabled // Event containing the contract specifics and raw log
  2374  
  2375  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2376  	event    string              // Event name to use for unpacking event data
  2377  
  2378  	logs chan types.Log        // Log channel receiving the found contract events
  2379  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2380  	done bool                  // Whether the subscription completed delivering logs
  2381  	fail error                 // Occurred error to stop iteration
  2382  }
  2383  
  2384  // Next advances the iterator to the subsequent event, returning whether there
  2385  // are any more events found. In case of a retrieval or parsing error, false is
  2386  // returned and Error() can be queried for the exact failure.
  2387  func (it *LendingpoolReserveUsedAsCollateralEnabledIterator) Next() bool {
  2388  	// If the iterator failed, stop iterating
  2389  	if it.fail != nil {
  2390  		return false
  2391  	}
  2392  	// If the iterator completed, deliver directly whatever's available
  2393  	if it.done {
  2394  		select {
  2395  		case log := <-it.logs:
  2396  			it.Event = new(LendingpoolReserveUsedAsCollateralEnabled)
  2397  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2398  				it.fail = err
  2399  				return false
  2400  			}
  2401  			it.Event.Raw = log
  2402  			return true
  2403  
  2404  		default:
  2405  			return false
  2406  		}
  2407  	}
  2408  	// Iterator still in progress, wait for either a data or an error event
  2409  	select {
  2410  	case log := <-it.logs:
  2411  		it.Event = new(LendingpoolReserveUsedAsCollateralEnabled)
  2412  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2413  			it.fail = err
  2414  			return false
  2415  		}
  2416  		it.Event.Raw = log
  2417  		return true
  2418  
  2419  	case err := <-it.sub.Err():
  2420  		it.done = true
  2421  		it.fail = err
  2422  		return it.Next()
  2423  	}
  2424  }
  2425  
  2426  // Error returns any retrieval or parsing error occurred during filtering.
  2427  func (it *LendingpoolReserveUsedAsCollateralEnabledIterator) Error() error {
  2428  	return it.fail
  2429  }
  2430  
  2431  // Close terminates the iteration process, releasing any pending underlying
  2432  // resources.
  2433  func (it *LendingpoolReserveUsedAsCollateralEnabledIterator) Close() error {
  2434  	it.sub.Unsubscribe()
  2435  	return nil
  2436  }
  2437  
  2438  // LendingpoolReserveUsedAsCollateralEnabled represents a ReserveUsedAsCollateralEnabled event raised by the Lendingpool contract.
  2439  type LendingpoolReserveUsedAsCollateralEnabled struct {
  2440  	Reserve common.Address
  2441  	User    common.Address
  2442  	Raw     types.Log // Blockchain specific contextual infos
  2443  }
  2444  
  2445  // FilterReserveUsedAsCollateralEnabled is a free log retrieval operation binding the contract event 0x00058a56ea94653cdf4f152d227ace22d4c00ad99e2a43f58cb7d9e3feb295f2.
  2446  //
  2447  // Solidity: event ReserveUsedAsCollateralEnabled(address indexed _reserve, address indexed _user)
  2448  func (_Lendingpool *LendingpoolFilterer) FilterReserveUsedAsCollateralEnabled(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address) (*LendingpoolReserveUsedAsCollateralEnabledIterator, error) {
  2449  
  2450  	var _reserveRule []interface{}
  2451  	for _, _reserveItem := range _reserve {
  2452  		_reserveRule = append(_reserveRule, _reserveItem)
  2453  	}
  2454  	var _userRule []interface{}
  2455  	for _, _userItem := range _user {
  2456  		_userRule = append(_userRule, _userItem)
  2457  	}
  2458  
  2459  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "ReserveUsedAsCollateralEnabled", _reserveRule, _userRule)
  2460  	if err != nil {
  2461  		return nil, err
  2462  	}
  2463  	return &LendingpoolReserveUsedAsCollateralEnabledIterator{contract: _Lendingpool.contract, event: "ReserveUsedAsCollateralEnabled", logs: logs, sub: sub}, nil
  2464  }
  2465  
  2466  // WatchReserveUsedAsCollateralEnabled is a free log subscription operation binding the contract event 0x00058a56ea94653cdf4f152d227ace22d4c00ad99e2a43f58cb7d9e3feb295f2.
  2467  //
  2468  // Solidity: event ReserveUsedAsCollateralEnabled(address indexed _reserve, address indexed _user)
  2469  func (_Lendingpool *LendingpoolFilterer) WatchReserveUsedAsCollateralEnabled(opts *bind.WatchOpts, sink chan<- *LendingpoolReserveUsedAsCollateralEnabled, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  2470  
  2471  	var _reserveRule []interface{}
  2472  	for _, _reserveItem := range _reserve {
  2473  		_reserveRule = append(_reserveRule, _reserveItem)
  2474  	}
  2475  	var _userRule []interface{}
  2476  	for _, _userItem := range _user {
  2477  		_userRule = append(_userRule, _userItem)
  2478  	}
  2479  
  2480  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "ReserveUsedAsCollateralEnabled", _reserveRule, _userRule)
  2481  	if err != nil {
  2482  		return nil, err
  2483  	}
  2484  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2485  		defer sub.Unsubscribe()
  2486  		for {
  2487  			select {
  2488  			case log := <-logs:
  2489  				// New log arrived, parse the event and forward to the user
  2490  				event := new(LendingpoolReserveUsedAsCollateralEnabled)
  2491  				if err := _Lendingpool.contract.UnpackLog(event, "ReserveUsedAsCollateralEnabled", log); err != nil {
  2492  					return err
  2493  				}
  2494  				event.Raw = log
  2495  
  2496  				select {
  2497  				case sink <- event:
  2498  				case err := <-sub.Err():
  2499  					return err
  2500  				case <-quit:
  2501  					return nil
  2502  				}
  2503  			case err := <-sub.Err():
  2504  				return err
  2505  			case <-quit:
  2506  				return nil
  2507  			}
  2508  		}
  2509  	}), nil
  2510  }
  2511  
  2512  // ParseReserveUsedAsCollateralEnabled is a log parse operation binding the contract event 0x00058a56ea94653cdf4f152d227ace22d4c00ad99e2a43f58cb7d9e3feb295f2.
  2513  //
  2514  // Solidity: event ReserveUsedAsCollateralEnabled(address indexed _reserve, address indexed _user)
  2515  func (_Lendingpool *LendingpoolFilterer) ParseReserveUsedAsCollateralEnabled(log types.Log) (*LendingpoolReserveUsedAsCollateralEnabled, error) {
  2516  	event := new(LendingpoolReserveUsedAsCollateralEnabled)
  2517  	if err := _Lendingpool.contract.UnpackLog(event, "ReserveUsedAsCollateralEnabled", log); err != nil {
  2518  		return nil, err
  2519  	}
  2520  	return event, nil
  2521  }
  2522  
  2523  // LendingpoolSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the Lendingpool contract.
  2524  type LendingpoolSwapIterator struct {
  2525  	Event *LendingpoolSwap // Event containing the contract specifics and raw log
  2526  
  2527  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2528  	event    string              // Event name to use for unpacking event data
  2529  
  2530  	logs chan types.Log        // Log channel receiving the found contract events
  2531  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2532  	done bool                  // Whether the subscription completed delivering logs
  2533  	fail error                 // Occurred error to stop iteration
  2534  }
  2535  
  2536  // Next advances the iterator to the subsequent event, returning whether there
  2537  // are any more events found. In case of a retrieval or parsing error, false is
  2538  // returned and Error() can be queried for the exact failure.
  2539  func (it *LendingpoolSwapIterator) Next() bool {
  2540  	// If the iterator failed, stop iterating
  2541  	if it.fail != nil {
  2542  		return false
  2543  	}
  2544  	// If the iterator completed, deliver directly whatever's available
  2545  	if it.done {
  2546  		select {
  2547  		case log := <-it.logs:
  2548  			it.Event = new(LendingpoolSwap)
  2549  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2550  				it.fail = err
  2551  				return false
  2552  			}
  2553  			it.Event.Raw = log
  2554  			return true
  2555  
  2556  		default:
  2557  			return false
  2558  		}
  2559  	}
  2560  	// Iterator still in progress, wait for either a data or an error event
  2561  	select {
  2562  	case log := <-it.logs:
  2563  		it.Event = new(LendingpoolSwap)
  2564  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2565  			it.fail = err
  2566  			return false
  2567  		}
  2568  		it.Event.Raw = log
  2569  		return true
  2570  
  2571  	case err := <-it.sub.Err():
  2572  		it.done = true
  2573  		it.fail = err
  2574  		return it.Next()
  2575  	}
  2576  }
  2577  
  2578  // Error returns any retrieval or parsing error occurred during filtering.
  2579  func (it *LendingpoolSwapIterator) Error() error {
  2580  	return it.fail
  2581  }
  2582  
  2583  // Close terminates the iteration process, releasing any pending underlying
  2584  // resources.
  2585  func (it *LendingpoolSwapIterator) Close() error {
  2586  	it.sub.Unsubscribe()
  2587  	return nil
  2588  }
  2589  
  2590  // LendingpoolSwap represents a Swap event raised by the Lendingpool contract.
  2591  type LendingpoolSwap struct {
  2592  	Reserve               common.Address
  2593  	User                  common.Address
  2594  	NewRateMode           *big.Int
  2595  	NewRate               *big.Int
  2596  	BorrowBalanceIncrease *big.Int
  2597  	Timestamp             *big.Int
  2598  	Raw                   types.Log // Blockchain specific contextual infos
  2599  }
  2600  
  2601  // FilterSwap is a free log retrieval operation binding the contract event 0xb3e2773606abfd36b5bd91394b3a54d1398336c65005baf7bf7a05efeffaf75b.
  2602  //
  2603  // Solidity: event Swap(address indexed _reserve, address indexed _user, uint256 _newRateMode, uint256 _newRate, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  2604  func (_Lendingpool *LendingpoolFilterer) FilterSwap(opts *bind.FilterOpts, _reserve []common.Address, _user []common.Address) (*LendingpoolSwapIterator, error) {
  2605  
  2606  	var _reserveRule []interface{}
  2607  	for _, _reserveItem := range _reserve {
  2608  		_reserveRule = append(_reserveRule, _reserveItem)
  2609  	}
  2610  	var _userRule []interface{}
  2611  	for _, _userItem := range _user {
  2612  		_userRule = append(_userRule, _userItem)
  2613  	}
  2614  
  2615  	logs, sub, err := _Lendingpool.contract.FilterLogs(opts, "Swap", _reserveRule, _userRule)
  2616  	if err != nil {
  2617  		return nil, err
  2618  	}
  2619  	return &LendingpoolSwapIterator{contract: _Lendingpool.contract, event: "Swap", logs: logs, sub: sub}, nil
  2620  }
  2621  
  2622  // WatchSwap is a free log subscription operation binding the contract event 0xb3e2773606abfd36b5bd91394b3a54d1398336c65005baf7bf7a05efeffaf75b.
  2623  //
  2624  // Solidity: event Swap(address indexed _reserve, address indexed _user, uint256 _newRateMode, uint256 _newRate, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  2625  func (_Lendingpool *LendingpoolFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *LendingpoolSwap, _reserve []common.Address, _user []common.Address) (event.Subscription, error) {
  2626  
  2627  	var _reserveRule []interface{}
  2628  	for _, _reserveItem := range _reserve {
  2629  		_reserveRule = append(_reserveRule, _reserveItem)
  2630  	}
  2631  	var _userRule []interface{}
  2632  	for _, _userItem := range _user {
  2633  		_userRule = append(_userRule, _userItem)
  2634  	}
  2635  
  2636  	logs, sub, err := _Lendingpool.contract.WatchLogs(opts, "Swap", _reserveRule, _userRule)
  2637  	if err != nil {
  2638  		return nil, err
  2639  	}
  2640  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2641  		defer sub.Unsubscribe()
  2642  		for {
  2643  			select {
  2644  			case log := <-logs:
  2645  				// New log arrived, parse the event and forward to the user
  2646  				event := new(LendingpoolSwap)
  2647  				if err := _Lendingpool.contract.UnpackLog(event, "Swap", log); err != nil {
  2648  					return err
  2649  				}
  2650  				event.Raw = log
  2651  
  2652  				select {
  2653  				case sink <- event:
  2654  				case err := <-sub.Err():
  2655  					return err
  2656  				case <-quit:
  2657  					return nil
  2658  				}
  2659  			case err := <-sub.Err():
  2660  				return err
  2661  			case <-quit:
  2662  				return nil
  2663  			}
  2664  		}
  2665  	}), nil
  2666  }
  2667  
  2668  // ParseSwap is a log parse operation binding the contract event 0xb3e2773606abfd36b5bd91394b3a54d1398336c65005baf7bf7a05efeffaf75b.
  2669  //
  2670  // Solidity: event Swap(address indexed _reserve, address indexed _user, uint256 _newRateMode, uint256 _newRate, uint256 _borrowBalanceIncrease, uint256 _timestamp)
  2671  func (_Lendingpool *LendingpoolFilterer) ParseSwap(log types.Log) (*LendingpoolSwap, error) {
  2672  	event := new(LendingpoolSwap)
  2673  	if err := _Lendingpool.contract.UnpackLog(event, "Swap", log); err != nil {
  2674  		return nil, err
  2675  	}
  2676  	return event, nil
  2677  }