github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/exchange-scrapers/platypusfinance/pool/pool.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 pool 5 6 import ( 7 "errors" 8 "math/big" 9 "strings" 10 11 ethereum "github.com/ethereum/go-ethereum" 12 "github.com/ethereum/go-ethereum/accounts/abi" 13 "github.com/ethereum/go-ethereum/accounts/abi/bind" 14 "github.com/ethereum/go-ethereum/common" 15 "github.com/ethereum/go-ethereum/core/types" 16 "github.com/ethereum/go-ethereum/event" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var ( 21 _ = errors.New 22 _ = big.NewInt 23 _ = strings.NewReader 24 _ = ethereum.NotFound 25 _ = bind.Bind 26 _ = common.Big1 27 _ = types.BloomLookup 28 _ = event.NewSubscription 29 ) 30 31 // PoolMetaData contains all meta data concerning the Pool contract. 32 var PoolMetaData = &bind.MetaData{ 33 ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"AssetAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousDev\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newDev\",\"type\":\"address\"}],\"name\":\"DevUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousHaircut\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newHaircut\",\"type\":\"uint256\"}],\"name\":\"HaircutRateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOracle\",\"type\":\"address\"}],\"name\":\"OracleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousPriceDeviation\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPriceDeviation\",\"type\":\"uint256\"}],\"name\":\"PriceDeviationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousRetentionRatio\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRetentionRatio\",\"type\":\"uint256\"}],\"name\":\"RetentionRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousK\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newK\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousC1\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newC1\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousXThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newXThreshold\",\"type\":\"uint256\"}],\"name\":\"SlippageParamsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fromToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"toToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fromAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"toAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"addAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"assetOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getC1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDev\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEquilibriumCoverageRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getHaircutRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxPriceDeviation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPriceOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRetentionRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSlippageParamK\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSlippageParamN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getXThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wantedToken\",\"type\":\"address\"}],\"name\":\"quoteMaxInitialAssetWithdrawable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maxInitialAssetAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fromAmount\",\"type\":\"uint256\"}],\"name\":\"quotePotentialSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"potentialOutcome\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"haircut\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"name\":\"quotePotentialWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"enoughCash\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wantedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"name\":\"quotePotentialWithdrawFromOtherAsset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"recoverUserFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"key\",\"type\":\"address\"}],\"name\":\"removeAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dev\",\"type\":\"address\"}],\"name\":\"setDev\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"haircutRate_\",\"type\":\"uint256\"}],\"name\":\"setHaircutRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxPriceDeviation_\",\"type\":\"uint256\"}],\"name\":\"setMaxPriceDeviation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"priceOracle\",\"type\":\"address\"}],\"name\":\"setPriceOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"retentionRatio_\",\"type\":\"uint256\"}],\"name\":\"setRetentionRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"k_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"n_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"c1_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"xThreshold_\",\"type\":\"uint256\"}],\"name\":\"setSlippageParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"fromToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"toToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fromAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimumToAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualToAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"haircut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimumAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"wantedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimumAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"withdrawFromOtherAsset\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", 34 } 35 36 // PoolABI is the input ABI used to generate the binding from. 37 // Deprecated: Use PoolMetaData.ABI instead. 38 var PoolABI = PoolMetaData.ABI 39 40 // Pool is an auto generated Go binding around an Ethereum contract. 41 type Pool struct { 42 PoolCaller // Read-only binding to the contract 43 PoolTransactor // Write-only binding to the contract 44 PoolFilterer // Log filterer for contract events 45 } 46 47 // PoolCaller is an auto generated read-only Go binding around an Ethereum contract. 48 type PoolCaller struct { 49 contract *bind.BoundContract // Generic contract wrapper for the low level calls 50 } 51 52 // PoolTransactor is an auto generated write-only Go binding around an Ethereum contract. 53 type PoolTransactor struct { 54 contract *bind.BoundContract // Generic contract wrapper for the low level calls 55 } 56 57 // PoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 58 type PoolFilterer struct { 59 contract *bind.BoundContract // Generic contract wrapper for the low level calls 60 } 61 62 // PoolSession is an auto generated Go binding around an Ethereum contract, 63 // with pre-set call and transact options. 64 type PoolSession struct { 65 Contract *Pool // Generic contract binding to set the session for 66 CallOpts bind.CallOpts // Call options to use throughout this session 67 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 68 } 69 70 // PoolCallerSession is an auto generated read-only Go binding around an Ethereum contract, 71 // with pre-set call options. 72 type PoolCallerSession struct { 73 Contract *PoolCaller // Generic contract caller binding to set the session for 74 CallOpts bind.CallOpts // Call options to use throughout this session 75 } 76 77 // PoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 78 // with pre-set transact options. 79 type PoolTransactorSession struct { 80 Contract *PoolTransactor // Generic contract transactor binding to set the session for 81 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 82 } 83 84 // PoolRaw is an auto generated low-level Go binding around an Ethereum contract. 85 type PoolRaw struct { 86 Contract *Pool // Generic contract binding to access the raw methods on 87 } 88 89 // PoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 90 type PoolCallerRaw struct { 91 Contract *PoolCaller // Generic read-only contract binding to access the raw methods on 92 } 93 94 // PoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 95 type PoolTransactorRaw struct { 96 Contract *PoolTransactor // Generic write-only contract binding to access the raw methods on 97 } 98 99 // NewPool creates a new instance of Pool, bound to a specific deployed contract. 100 func NewPool(address common.Address, backend bind.ContractBackend) (*Pool, error) { 101 contract, err := bindPool(address, backend, backend, backend) 102 if err != nil { 103 return nil, err 104 } 105 return &Pool{PoolCaller: PoolCaller{contract: contract}, PoolTransactor: PoolTransactor{contract: contract}, PoolFilterer: PoolFilterer{contract: contract}}, nil 106 } 107 108 // NewPoolCaller creates a new read-only instance of Pool, bound to a specific deployed contract. 109 func NewPoolCaller(address common.Address, caller bind.ContractCaller) (*PoolCaller, error) { 110 contract, err := bindPool(address, caller, nil, nil) 111 if err != nil { 112 return nil, err 113 } 114 return &PoolCaller{contract: contract}, nil 115 } 116 117 // NewPoolTransactor creates a new write-only instance of Pool, bound to a specific deployed contract. 118 func NewPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*PoolTransactor, error) { 119 contract, err := bindPool(address, nil, transactor, nil) 120 if err != nil { 121 return nil, err 122 } 123 return &PoolTransactor{contract: contract}, nil 124 } 125 126 // NewPoolFilterer creates a new log filterer instance of Pool, bound to a specific deployed contract. 127 func NewPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*PoolFilterer, error) { 128 contract, err := bindPool(address, nil, nil, filterer) 129 if err != nil { 130 return nil, err 131 } 132 return &PoolFilterer{contract: contract}, nil 133 } 134 135 // bindPool binds a generic wrapper to an already deployed contract. 136 func bindPool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 137 parsed, err := abi.JSON(strings.NewReader(PoolABI)) 138 if err != nil { 139 return nil, err 140 } 141 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 142 } 143 144 // Call invokes the (constant) contract method with params as input values and 145 // sets the output to result. The result type might be a single field for simple 146 // returns, a slice of interfaces for anonymous returns and a struct for named 147 // returns. 148 func (_Pool *PoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 149 return _Pool.Contract.PoolCaller.contract.Call(opts, result, method, params...) 150 } 151 152 // Transfer initiates a plain transaction to move funds to the contract, calling 153 // its default method if one is available. 154 func (_Pool *PoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 155 return _Pool.Contract.PoolTransactor.contract.Transfer(opts) 156 } 157 158 // Transact invokes the (paid) contract method with params as input values. 159 func (_Pool *PoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 160 return _Pool.Contract.PoolTransactor.contract.Transact(opts, method, params...) 161 } 162 163 // Call invokes the (constant) contract method with params as input values and 164 // sets the output to result. The result type might be a single field for simple 165 // returns, a slice of interfaces for anonymous returns and a struct for named 166 // returns. 167 func (_Pool *PoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 168 return _Pool.Contract.contract.Call(opts, result, method, params...) 169 } 170 171 // Transfer initiates a plain transaction to move funds to the contract, calling 172 // its default method if one is available. 173 func (_Pool *PoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 174 return _Pool.Contract.contract.Transfer(opts) 175 } 176 177 // Transact invokes the (paid) contract method with params as input values. 178 func (_Pool *PoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 179 return _Pool.Contract.contract.Transact(opts, method, params...) 180 } 181 182 // AssetOf is a free data retrieval call binding the contract method 0x71f96211. 183 // 184 // Solidity: function assetOf(address token) view returns(address) 185 func (_Pool *PoolCaller) AssetOf(opts *bind.CallOpts, token common.Address) (common.Address, error) { 186 var out []interface{} 187 err := _Pool.contract.Call(opts, &out, "assetOf", token) 188 189 if err != nil { 190 return *new(common.Address), err 191 } 192 193 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 194 195 return out0, err 196 197 } 198 199 // AssetOf is a free data retrieval call binding the contract method 0x71f96211. 200 // 201 // Solidity: function assetOf(address token) view returns(address) 202 func (_Pool *PoolSession) AssetOf(token common.Address) (common.Address, error) { 203 return _Pool.Contract.AssetOf(&_Pool.CallOpts, token) 204 } 205 206 // AssetOf is a free data retrieval call binding the contract method 0x71f96211. 207 // 208 // Solidity: function assetOf(address token) view returns(address) 209 func (_Pool *PoolCallerSession) AssetOf(token common.Address) (common.Address, error) { 210 return _Pool.Contract.AssetOf(&_Pool.CallOpts, token) 211 } 212 213 // GetC1 is a free data retrieval call binding the contract method 0xa76f54d2. 214 // 215 // Solidity: function getC1() view returns(uint256) 216 func (_Pool *PoolCaller) GetC1(opts *bind.CallOpts) (*big.Int, error) { 217 var out []interface{} 218 err := _Pool.contract.Call(opts, &out, "getC1") 219 220 if err != nil { 221 return *new(*big.Int), err 222 } 223 224 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 225 226 return out0, err 227 228 } 229 230 // GetC1 is a free data retrieval call binding the contract method 0xa76f54d2. 231 // 232 // Solidity: function getC1() view returns(uint256) 233 func (_Pool *PoolSession) GetC1() (*big.Int, error) { 234 return _Pool.Contract.GetC1(&_Pool.CallOpts) 235 } 236 237 // GetC1 is a free data retrieval call binding the contract method 0xa76f54d2. 238 // 239 // Solidity: function getC1() view returns(uint256) 240 func (_Pool *PoolCallerSession) GetC1() (*big.Int, error) { 241 return _Pool.Contract.GetC1(&_Pool.CallOpts) 242 } 243 244 // GetDev is a free data retrieval call binding the contract method 0x09bb9267. 245 // 246 // Solidity: function getDev() view returns(address) 247 func (_Pool *PoolCaller) GetDev(opts *bind.CallOpts) (common.Address, error) { 248 var out []interface{} 249 err := _Pool.contract.Call(opts, &out, "getDev") 250 251 if err != nil { 252 return *new(common.Address), err 253 } 254 255 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 256 257 return out0, err 258 259 } 260 261 // GetDev is a free data retrieval call binding the contract method 0x09bb9267. 262 // 263 // Solidity: function getDev() view returns(address) 264 func (_Pool *PoolSession) GetDev() (common.Address, error) { 265 return _Pool.Contract.GetDev(&_Pool.CallOpts) 266 } 267 268 // GetDev is a free data retrieval call binding the contract method 0x09bb9267. 269 // 270 // Solidity: function getDev() view returns(address) 271 func (_Pool *PoolCallerSession) GetDev() (common.Address, error) { 272 return _Pool.Contract.GetDev(&_Pool.CallOpts) 273 } 274 275 // GetEquilibriumCoverageRatio is a free data retrieval call binding the contract method 0x05f7bc26. 276 // 277 // Solidity: function getEquilibriumCoverageRatio() view returns(uint256) 278 func (_Pool *PoolCaller) GetEquilibriumCoverageRatio(opts *bind.CallOpts) (*big.Int, error) { 279 var out []interface{} 280 err := _Pool.contract.Call(opts, &out, "getEquilibriumCoverageRatio") 281 282 if err != nil { 283 return *new(*big.Int), err 284 } 285 286 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 287 288 return out0, err 289 290 } 291 292 // GetEquilibriumCoverageRatio is a free data retrieval call binding the contract method 0x05f7bc26. 293 // 294 // Solidity: function getEquilibriumCoverageRatio() view returns(uint256) 295 func (_Pool *PoolSession) GetEquilibriumCoverageRatio() (*big.Int, error) { 296 return _Pool.Contract.GetEquilibriumCoverageRatio(&_Pool.CallOpts) 297 } 298 299 // GetEquilibriumCoverageRatio is a free data retrieval call binding the contract method 0x05f7bc26. 300 // 301 // Solidity: function getEquilibriumCoverageRatio() view returns(uint256) 302 func (_Pool *PoolCallerSession) GetEquilibriumCoverageRatio() (*big.Int, error) { 303 return _Pool.Contract.GetEquilibriumCoverageRatio(&_Pool.CallOpts) 304 } 305 306 // GetHaircutRate is a free data retrieval call binding the contract method 0x7fdd5a8e. 307 // 308 // Solidity: function getHaircutRate() view returns(uint256) 309 func (_Pool *PoolCaller) GetHaircutRate(opts *bind.CallOpts) (*big.Int, error) { 310 var out []interface{} 311 err := _Pool.contract.Call(opts, &out, "getHaircutRate") 312 313 if err != nil { 314 return *new(*big.Int), err 315 } 316 317 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 318 319 return out0, err 320 321 } 322 323 // GetHaircutRate is a free data retrieval call binding the contract method 0x7fdd5a8e. 324 // 325 // Solidity: function getHaircutRate() view returns(uint256) 326 func (_Pool *PoolSession) GetHaircutRate() (*big.Int, error) { 327 return _Pool.Contract.GetHaircutRate(&_Pool.CallOpts) 328 } 329 330 // GetHaircutRate is a free data retrieval call binding the contract method 0x7fdd5a8e. 331 // 332 // Solidity: function getHaircutRate() view returns(uint256) 333 func (_Pool *PoolCallerSession) GetHaircutRate() (*big.Int, error) { 334 return _Pool.Contract.GetHaircutRate(&_Pool.CallOpts) 335 } 336 337 // GetMaxPriceDeviation is a free data retrieval call binding the contract method 0xddcbc516. 338 // 339 // Solidity: function getMaxPriceDeviation() view returns(uint256) 340 func (_Pool *PoolCaller) GetMaxPriceDeviation(opts *bind.CallOpts) (*big.Int, error) { 341 var out []interface{} 342 err := _Pool.contract.Call(opts, &out, "getMaxPriceDeviation") 343 344 if err != nil { 345 return *new(*big.Int), err 346 } 347 348 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 349 350 return out0, err 351 352 } 353 354 // GetMaxPriceDeviation is a free data retrieval call binding the contract method 0xddcbc516. 355 // 356 // Solidity: function getMaxPriceDeviation() view returns(uint256) 357 func (_Pool *PoolSession) GetMaxPriceDeviation() (*big.Int, error) { 358 return _Pool.Contract.GetMaxPriceDeviation(&_Pool.CallOpts) 359 } 360 361 // GetMaxPriceDeviation is a free data retrieval call binding the contract method 0xddcbc516. 362 // 363 // Solidity: function getMaxPriceDeviation() view returns(uint256) 364 func (_Pool *PoolCallerSession) GetMaxPriceDeviation() (*big.Int, error) { 365 return _Pool.Contract.GetMaxPriceDeviation(&_Pool.CallOpts) 366 } 367 368 // GetPriceOracle is a free data retrieval call binding the contract method 0xfca513a8. 369 // 370 // Solidity: function getPriceOracle() view returns(address) 371 func (_Pool *PoolCaller) GetPriceOracle(opts *bind.CallOpts) (common.Address, error) { 372 var out []interface{} 373 err := _Pool.contract.Call(opts, &out, "getPriceOracle") 374 375 if err != nil { 376 return *new(common.Address), err 377 } 378 379 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 380 381 return out0, err 382 383 } 384 385 // GetPriceOracle is a free data retrieval call binding the contract method 0xfca513a8. 386 // 387 // Solidity: function getPriceOracle() view returns(address) 388 func (_Pool *PoolSession) GetPriceOracle() (common.Address, error) { 389 return _Pool.Contract.GetPriceOracle(&_Pool.CallOpts) 390 } 391 392 // GetPriceOracle is a free data retrieval call binding the contract method 0xfca513a8. 393 // 394 // Solidity: function getPriceOracle() view returns(address) 395 func (_Pool *PoolCallerSession) GetPriceOracle() (common.Address, error) { 396 return _Pool.Contract.GetPriceOracle(&_Pool.CallOpts) 397 } 398 399 // GetRetentionRatio is a free data retrieval call binding the contract method 0xcb733d7a. 400 // 401 // Solidity: function getRetentionRatio() view returns(uint256) 402 func (_Pool *PoolCaller) GetRetentionRatio(opts *bind.CallOpts) (*big.Int, error) { 403 var out []interface{} 404 err := _Pool.contract.Call(opts, &out, "getRetentionRatio") 405 406 if err != nil { 407 return *new(*big.Int), err 408 } 409 410 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 411 412 return out0, err 413 414 } 415 416 // GetRetentionRatio is a free data retrieval call binding the contract method 0xcb733d7a. 417 // 418 // Solidity: function getRetentionRatio() view returns(uint256) 419 func (_Pool *PoolSession) GetRetentionRatio() (*big.Int, error) { 420 return _Pool.Contract.GetRetentionRatio(&_Pool.CallOpts) 421 } 422 423 // GetRetentionRatio is a free data retrieval call binding the contract method 0xcb733d7a. 424 // 425 // Solidity: function getRetentionRatio() view returns(uint256) 426 func (_Pool *PoolCallerSession) GetRetentionRatio() (*big.Int, error) { 427 return _Pool.Contract.GetRetentionRatio(&_Pool.CallOpts) 428 } 429 430 // GetSlippageParamK is a free data retrieval call binding the contract method 0x55af008a. 431 // 432 // Solidity: function getSlippageParamK() view returns(uint256) 433 func (_Pool *PoolCaller) GetSlippageParamK(opts *bind.CallOpts) (*big.Int, error) { 434 var out []interface{} 435 err := _Pool.contract.Call(opts, &out, "getSlippageParamK") 436 437 if err != nil { 438 return *new(*big.Int), err 439 } 440 441 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 442 443 return out0, err 444 445 } 446 447 // GetSlippageParamK is a free data retrieval call binding the contract method 0x55af008a. 448 // 449 // Solidity: function getSlippageParamK() view returns(uint256) 450 func (_Pool *PoolSession) GetSlippageParamK() (*big.Int, error) { 451 return _Pool.Contract.GetSlippageParamK(&_Pool.CallOpts) 452 } 453 454 // GetSlippageParamK is a free data retrieval call binding the contract method 0x55af008a. 455 // 456 // Solidity: function getSlippageParamK() view returns(uint256) 457 func (_Pool *PoolCallerSession) GetSlippageParamK() (*big.Int, error) { 458 return _Pool.Contract.GetSlippageParamK(&_Pool.CallOpts) 459 } 460 461 // GetSlippageParamN is a free data retrieval call binding the contract method 0x7727c655. 462 // 463 // Solidity: function getSlippageParamN() view returns(uint256) 464 func (_Pool *PoolCaller) GetSlippageParamN(opts *bind.CallOpts) (*big.Int, error) { 465 var out []interface{} 466 err := _Pool.contract.Call(opts, &out, "getSlippageParamN") 467 468 if err != nil { 469 return *new(*big.Int), err 470 } 471 472 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 473 474 return out0, err 475 476 } 477 478 // GetSlippageParamN is a free data retrieval call binding the contract method 0x7727c655. 479 // 480 // Solidity: function getSlippageParamN() view returns(uint256) 481 func (_Pool *PoolSession) GetSlippageParamN() (*big.Int, error) { 482 return _Pool.Contract.GetSlippageParamN(&_Pool.CallOpts) 483 } 484 485 // GetSlippageParamN is a free data retrieval call binding the contract method 0x7727c655. 486 // 487 // Solidity: function getSlippageParamN() view returns(uint256) 488 func (_Pool *PoolCallerSession) GetSlippageParamN() (*big.Int, error) { 489 return _Pool.Contract.GetSlippageParamN(&_Pool.CallOpts) 490 } 491 492 // GetTokenAddresses is a free data retrieval call binding the contract method 0xee8c24b8. 493 // 494 // Solidity: function getTokenAddresses() view returns(address[]) 495 func (_Pool *PoolCaller) GetTokenAddresses(opts *bind.CallOpts) ([]common.Address, error) { 496 var out []interface{} 497 err := _Pool.contract.Call(opts, &out, "getTokenAddresses") 498 499 if err != nil { 500 return *new([]common.Address), err 501 } 502 503 out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) 504 505 return out0, err 506 507 } 508 509 // GetTokenAddresses is a free data retrieval call binding the contract method 0xee8c24b8. 510 // 511 // Solidity: function getTokenAddresses() view returns(address[]) 512 func (_Pool *PoolSession) GetTokenAddresses() ([]common.Address, error) { 513 return _Pool.Contract.GetTokenAddresses(&_Pool.CallOpts) 514 } 515 516 // GetTokenAddresses is a free data retrieval call binding the contract method 0xee8c24b8. 517 // 518 // Solidity: function getTokenAddresses() view returns(address[]) 519 func (_Pool *PoolCallerSession) GetTokenAddresses() ([]common.Address, error) { 520 return _Pool.Contract.GetTokenAddresses(&_Pool.CallOpts) 521 } 522 523 // GetXThreshold is a free data retrieval call binding the contract method 0x7a1c36d1. 524 // 525 // Solidity: function getXThreshold() view returns(uint256) 526 func (_Pool *PoolCaller) GetXThreshold(opts *bind.CallOpts) (*big.Int, error) { 527 var out []interface{} 528 err := _Pool.contract.Call(opts, &out, "getXThreshold") 529 530 if err != nil { 531 return *new(*big.Int), err 532 } 533 534 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 535 536 return out0, err 537 538 } 539 540 // GetXThreshold is a free data retrieval call binding the contract method 0x7a1c36d1. 541 // 542 // Solidity: function getXThreshold() view returns(uint256) 543 func (_Pool *PoolSession) GetXThreshold() (*big.Int, error) { 544 return _Pool.Contract.GetXThreshold(&_Pool.CallOpts) 545 } 546 547 // GetXThreshold is a free data retrieval call binding the contract method 0x7a1c36d1. 548 // 549 // Solidity: function getXThreshold() view returns(uint256) 550 func (_Pool *PoolCallerSession) GetXThreshold() (*big.Int, error) { 551 return _Pool.Contract.GetXThreshold(&_Pool.CallOpts) 552 } 553 554 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 555 // 556 // Solidity: function owner() view returns(address) 557 func (_Pool *PoolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { 558 var out []interface{} 559 err := _Pool.contract.Call(opts, &out, "owner") 560 561 if err != nil { 562 return *new(common.Address), err 563 } 564 565 out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) 566 567 return out0, err 568 569 } 570 571 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 572 // 573 // Solidity: function owner() view returns(address) 574 func (_Pool *PoolSession) Owner() (common.Address, error) { 575 return _Pool.Contract.Owner(&_Pool.CallOpts) 576 } 577 578 // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. 579 // 580 // Solidity: function owner() view returns(address) 581 func (_Pool *PoolCallerSession) Owner() (common.Address, error) { 582 return _Pool.Contract.Owner(&_Pool.CallOpts) 583 } 584 585 // Paused is a free data retrieval call binding the contract method 0x5c975abb. 586 // 587 // Solidity: function paused() view returns(bool) 588 func (_Pool *PoolCaller) Paused(opts *bind.CallOpts) (bool, error) { 589 var out []interface{} 590 err := _Pool.contract.Call(opts, &out, "paused") 591 592 if err != nil { 593 return *new(bool), err 594 } 595 596 out0 := *abi.ConvertType(out[0], new(bool)).(*bool) 597 598 return out0, err 599 600 } 601 602 // Paused is a free data retrieval call binding the contract method 0x5c975abb. 603 // 604 // Solidity: function paused() view returns(bool) 605 func (_Pool *PoolSession) Paused() (bool, error) { 606 return _Pool.Contract.Paused(&_Pool.CallOpts) 607 } 608 609 // Paused is a free data retrieval call binding the contract method 0x5c975abb. 610 // 611 // Solidity: function paused() view returns(bool) 612 func (_Pool *PoolCallerSession) Paused() (bool, error) { 613 return _Pool.Contract.Paused(&_Pool.CallOpts) 614 } 615 616 // QuoteMaxInitialAssetWithdrawable is a free data retrieval call binding the contract method 0x2a803b5e. 617 // 618 // Solidity: function quoteMaxInitialAssetWithdrawable(address initialToken, address wantedToken) view returns(uint256 maxInitialAssetAmount) 619 func (_Pool *PoolCaller) QuoteMaxInitialAssetWithdrawable(opts *bind.CallOpts, initialToken common.Address, wantedToken common.Address) (*big.Int, error) { 620 var out []interface{} 621 err := _Pool.contract.Call(opts, &out, "quoteMaxInitialAssetWithdrawable", initialToken, wantedToken) 622 623 if err != nil { 624 return *new(*big.Int), err 625 } 626 627 out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 628 629 return out0, err 630 631 } 632 633 // QuoteMaxInitialAssetWithdrawable is a free data retrieval call binding the contract method 0x2a803b5e. 634 // 635 // Solidity: function quoteMaxInitialAssetWithdrawable(address initialToken, address wantedToken) view returns(uint256 maxInitialAssetAmount) 636 func (_Pool *PoolSession) QuoteMaxInitialAssetWithdrawable(initialToken common.Address, wantedToken common.Address) (*big.Int, error) { 637 return _Pool.Contract.QuoteMaxInitialAssetWithdrawable(&_Pool.CallOpts, initialToken, wantedToken) 638 } 639 640 // QuoteMaxInitialAssetWithdrawable is a free data retrieval call binding the contract method 0x2a803b5e. 641 // 642 // Solidity: function quoteMaxInitialAssetWithdrawable(address initialToken, address wantedToken) view returns(uint256 maxInitialAssetAmount) 643 func (_Pool *PoolCallerSession) QuoteMaxInitialAssetWithdrawable(initialToken common.Address, wantedToken common.Address) (*big.Int, error) { 644 return _Pool.Contract.QuoteMaxInitialAssetWithdrawable(&_Pool.CallOpts, initialToken, wantedToken) 645 } 646 647 // QuotePotentialSwap is a free data retrieval call binding the contract method 0x43c2e2f5. 648 // 649 // Solidity: function quotePotentialSwap(address fromToken, address toToken, uint256 fromAmount) view returns(uint256 potentialOutcome, uint256 haircut) 650 func (_Pool *PoolCaller) QuotePotentialSwap(opts *bind.CallOpts, fromToken common.Address, toToken common.Address, fromAmount *big.Int) (struct { 651 PotentialOutcome *big.Int 652 Haircut *big.Int 653 }, error) { 654 var out []interface{} 655 err := _Pool.contract.Call(opts, &out, "quotePotentialSwap", fromToken, toToken, fromAmount) 656 657 outstruct := new(struct { 658 PotentialOutcome *big.Int 659 Haircut *big.Int 660 }) 661 if err != nil { 662 return *outstruct, err 663 } 664 665 outstruct.PotentialOutcome = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 666 outstruct.Haircut = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) 667 668 return *outstruct, err 669 670 } 671 672 // QuotePotentialSwap is a free data retrieval call binding the contract method 0x43c2e2f5. 673 // 674 // Solidity: function quotePotentialSwap(address fromToken, address toToken, uint256 fromAmount) view returns(uint256 potentialOutcome, uint256 haircut) 675 func (_Pool *PoolSession) QuotePotentialSwap(fromToken common.Address, toToken common.Address, fromAmount *big.Int) (struct { 676 PotentialOutcome *big.Int 677 Haircut *big.Int 678 }, error) { 679 return _Pool.Contract.QuotePotentialSwap(&_Pool.CallOpts, fromToken, toToken, fromAmount) 680 } 681 682 // QuotePotentialSwap is a free data retrieval call binding the contract method 0x43c2e2f5. 683 // 684 // Solidity: function quotePotentialSwap(address fromToken, address toToken, uint256 fromAmount) view returns(uint256 potentialOutcome, uint256 haircut) 685 func (_Pool *PoolCallerSession) QuotePotentialSwap(fromToken common.Address, toToken common.Address, fromAmount *big.Int) (struct { 686 PotentialOutcome *big.Int 687 Haircut *big.Int 688 }, error) { 689 return _Pool.Contract.QuotePotentialSwap(&_Pool.CallOpts, fromToken, toToken, fromAmount) 690 } 691 692 // QuotePotentialWithdraw is a free data retrieval call binding the contract method 0x907448ed. 693 // 694 // Solidity: function quotePotentialWithdraw(address token, uint256 liquidity) view returns(uint256 amount, uint256 fee, bool enoughCash) 695 func (_Pool *PoolCaller) QuotePotentialWithdraw(opts *bind.CallOpts, token common.Address, liquidity *big.Int) (struct { 696 Amount *big.Int 697 Fee *big.Int 698 EnoughCash bool 699 }, error) { 700 var out []interface{} 701 err := _Pool.contract.Call(opts, &out, "quotePotentialWithdraw", token, liquidity) 702 703 outstruct := new(struct { 704 Amount *big.Int 705 Fee *big.Int 706 EnoughCash bool 707 }) 708 if err != nil { 709 return *outstruct, err 710 } 711 712 outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 713 outstruct.Fee = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) 714 outstruct.EnoughCash = *abi.ConvertType(out[2], new(bool)).(*bool) 715 716 return *outstruct, err 717 718 } 719 720 // QuotePotentialWithdraw is a free data retrieval call binding the contract method 0x907448ed. 721 // 722 // Solidity: function quotePotentialWithdraw(address token, uint256 liquidity) view returns(uint256 amount, uint256 fee, bool enoughCash) 723 func (_Pool *PoolSession) QuotePotentialWithdraw(token common.Address, liquidity *big.Int) (struct { 724 Amount *big.Int 725 Fee *big.Int 726 EnoughCash bool 727 }, error) { 728 return _Pool.Contract.QuotePotentialWithdraw(&_Pool.CallOpts, token, liquidity) 729 } 730 731 // QuotePotentialWithdraw is a free data retrieval call binding the contract method 0x907448ed. 732 // 733 // Solidity: function quotePotentialWithdraw(address token, uint256 liquidity) view returns(uint256 amount, uint256 fee, bool enoughCash) 734 func (_Pool *PoolCallerSession) QuotePotentialWithdraw(token common.Address, liquidity *big.Int) (struct { 735 Amount *big.Int 736 Fee *big.Int 737 EnoughCash bool 738 }, error) { 739 return _Pool.Contract.QuotePotentialWithdraw(&_Pool.CallOpts, token, liquidity) 740 } 741 742 // QuotePotentialWithdrawFromOtherAsset is a free data retrieval call binding the contract method 0xa4275ceb. 743 // 744 // Solidity: function quotePotentialWithdrawFromOtherAsset(address initialToken, address wantedToken, uint256 liquidity) view returns(uint256 amount, uint256 fee) 745 func (_Pool *PoolCaller) QuotePotentialWithdrawFromOtherAsset(opts *bind.CallOpts, initialToken common.Address, wantedToken common.Address, liquidity *big.Int) (struct { 746 Amount *big.Int 747 Fee *big.Int 748 }, error) { 749 var out []interface{} 750 err := _Pool.contract.Call(opts, &out, "quotePotentialWithdrawFromOtherAsset", initialToken, wantedToken, liquidity) 751 752 outstruct := new(struct { 753 Amount *big.Int 754 Fee *big.Int 755 }) 756 if err != nil { 757 return *outstruct, err 758 } 759 760 outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) 761 outstruct.Fee = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) 762 763 return *outstruct, err 764 765 } 766 767 // QuotePotentialWithdrawFromOtherAsset is a free data retrieval call binding the contract method 0xa4275ceb. 768 // 769 // Solidity: function quotePotentialWithdrawFromOtherAsset(address initialToken, address wantedToken, uint256 liquidity) view returns(uint256 amount, uint256 fee) 770 func (_Pool *PoolSession) QuotePotentialWithdrawFromOtherAsset(initialToken common.Address, wantedToken common.Address, liquidity *big.Int) (struct { 771 Amount *big.Int 772 Fee *big.Int 773 }, error) { 774 return _Pool.Contract.QuotePotentialWithdrawFromOtherAsset(&_Pool.CallOpts, initialToken, wantedToken, liquidity) 775 } 776 777 // QuotePotentialWithdrawFromOtherAsset is a free data retrieval call binding the contract method 0xa4275ceb. 778 // 779 // Solidity: function quotePotentialWithdrawFromOtherAsset(address initialToken, address wantedToken, uint256 liquidity) view returns(uint256 amount, uint256 fee) 780 func (_Pool *PoolCallerSession) QuotePotentialWithdrawFromOtherAsset(initialToken common.Address, wantedToken common.Address, liquidity *big.Int) (struct { 781 Amount *big.Int 782 Fee *big.Int 783 }, error) { 784 return _Pool.Contract.QuotePotentialWithdrawFromOtherAsset(&_Pool.CallOpts, initialToken, wantedToken, liquidity) 785 } 786 787 // AddAsset is a paid mutator transaction binding the contract method 0xda489997. 788 // 789 // Solidity: function addAsset(address token, address asset) returns() 790 func (_Pool *PoolTransactor) AddAsset(opts *bind.TransactOpts, token common.Address, asset common.Address) (*types.Transaction, error) { 791 return _Pool.contract.Transact(opts, "addAsset", token, asset) 792 } 793 794 // AddAsset is a paid mutator transaction binding the contract method 0xda489997. 795 // 796 // Solidity: function addAsset(address token, address asset) returns() 797 func (_Pool *PoolSession) AddAsset(token common.Address, asset common.Address) (*types.Transaction, error) { 798 return _Pool.Contract.AddAsset(&_Pool.TransactOpts, token, asset) 799 } 800 801 // AddAsset is a paid mutator transaction binding the contract method 0xda489997. 802 // 803 // Solidity: function addAsset(address token, address asset) returns() 804 func (_Pool *PoolTransactorSession) AddAsset(token common.Address, asset common.Address) (*types.Transaction, error) { 805 return _Pool.Contract.AddAsset(&_Pool.TransactOpts, token, asset) 806 } 807 808 // Deposit is a paid mutator transaction binding the contract method 0x90d25074. 809 // 810 // Solidity: function deposit(address token, uint256 amount, address to, uint256 deadline) returns(uint256 liquidity) 811 func (_Pool *PoolTransactor) Deposit(opts *bind.TransactOpts, token common.Address, amount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 812 return _Pool.contract.Transact(opts, "deposit", token, amount, to, deadline) 813 } 814 815 // Deposit is a paid mutator transaction binding the contract method 0x90d25074. 816 // 817 // Solidity: function deposit(address token, uint256 amount, address to, uint256 deadline) returns(uint256 liquidity) 818 func (_Pool *PoolSession) Deposit(token common.Address, amount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 819 return _Pool.Contract.Deposit(&_Pool.TransactOpts, token, amount, to, deadline) 820 } 821 822 // Deposit is a paid mutator transaction binding the contract method 0x90d25074. 823 // 824 // Solidity: function deposit(address token, uint256 amount, address to, uint256 deadline) returns(uint256 liquidity) 825 func (_Pool *PoolTransactorSession) Deposit(token common.Address, amount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 826 return _Pool.Contract.Deposit(&_Pool.TransactOpts, token, amount, to, deadline) 827 } 828 829 // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. 830 // 831 // Solidity: function initialize() returns() 832 func (_Pool *PoolTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { 833 return _Pool.contract.Transact(opts, "initialize") 834 } 835 836 // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. 837 // 838 // Solidity: function initialize() returns() 839 func (_Pool *PoolSession) Initialize() (*types.Transaction, error) { 840 return _Pool.Contract.Initialize(&_Pool.TransactOpts) 841 } 842 843 // Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. 844 // 845 // Solidity: function initialize() returns() 846 func (_Pool *PoolTransactorSession) Initialize() (*types.Transaction, error) { 847 return _Pool.Contract.Initialize(&_Pool.TransactOpts) 848 } 849 850 // Pause is a paid mutator transaction binding the contract method 0x8456cb59. 851 // 852 // Solidity: function pause() returns() 853 func (_Pool *PoolTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { 854 return _Pool.contract.Transact(opts, "pause") 855 } 856 857 // Pause is a paid mutator transaction binding the contract method 0x8456cb59. 858 // 859 // Solidity: function pause() returns() 860 func (_Pool *PoolSession) Pause() (*types.Transaction, error) { 861 return _Pool.Contract.Pause(&_Pool.TransactOpts) 862 } 863 864 // Pause is a paid mutator transaction binding the contract method 0x8456cb59. 865 // 866 // Solidity: function pause() returns() 867 func (_Pool *PoolTransactorSession) Pause() (*types.Transaction, error) { 868 return _Pool.Contract.Pause(&_Pool.TransactOpts) 869 } 870 871 // RecoverUserFunds is a paid mutator transaction binding the contract method 0x0d4636b5. 872 // 873 // Solidity: function recoverUserFunds(address token) returns() 874 func (_Pool *PoolTransactor) RecoverUserFunds(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { 875 return _Pool.contract.Transact(opts, "recoverUserFunds", token) 876 } 877 878 // RecoverUserFunds is a paid mutator transaction binding the contract method 0x0d4636b5. 879 // 880 // Solidity: function recoverUserFunds(address token) returns() 881 func (_Pool *PoolSession) RecoverUserFunds(token common.Address) (*types.Transaction, error) { 882 return _Pool.Contract.RecoverUserFunds(&_Pool.TransactOpts, token) 883 } 884 885 // RecoverUserFunds is a paid mutator transaction binding the contract method 0x0d4636b5. 886 // 887 // Solidity: function recoverUserFunds(address token) returns() 888 func (_Pool *PoolTransactorSession) RecoverUserFunds(token common.Address) (*types.Transaction, error) { 889 return _Pool.Contract.RecoverUserFunds(&_Pool.TransactOpts, token) 890 } 891 892 // RemoveAsset is a paid mutator transaction binding the contract method 0x4a5e42b1. 893 // 894 // Solidity: function removeAsset(address key) returns() 895 func (_Pool *PoolTransactor) RemoveAsset(opts *bind.TransactOpts, key common.Address) (*types.Transaction, error) { 896 return _Pool.contract.Transact(opts, "removeAsset", key) 897 } 898 899 // RemoveAsset is a paid mutator transaction binding the contract method 0x4a5e42b1. 900 // 901 // Solidity: function removeAsset(address key) returns() 902 func (_Pool *PoolSession) RemoveAsset(key common.Address) (*types.Transaction, error) { 903 return _Pool.Contract.RemoveAsset(&_Pool.TransactOpts, key) 904 } 905 906 // RemoveAsset is a paid mutator transaction binding the contract method 0x4a5e42b1. 907 // 908 // Solidity: function removeAsset(address key) returns() 909 func (_Pool *PoolTransactorSession) RemoveAsset(key common.Address) (*types.Transaction, error) { 910 return _Pool.Contract.RemoveAsset(&_Pool.TransactOpts, key) 911 } 912 913 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 914 // 915 // Solidity: function renounceOwnership() returns() 916 func (_Pool *PoolTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { 917 return _Pool.contract.Transact(opts, "renounceOwnership") 918 } 919 920 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 921 // 922 // Solidity: function renounceOwnership() returns() 923 func (_Pool *PoolSession) RenounceOwnership() (*types.Transaction, error) { 924 return _Pool.Contract.RenounceOwnership(&_Pool.TransactOpts) 925 } 926 927 // RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. 928 // 929 // Solidity: function renounceOwnership() returns() 930 func (_Pool *PoolTransactorSession) RenounceOwnership() (*types.Transaction, error) { 931 return _Pool.Contract.RenounceOwnership(&_Pool.TransactOpts) 932 } 933 934 // SetDev is a paid mutator transaction binding the contract method 0xd477f05f. 935 // 936 // Solidity: function setDev(address dev) returns() 937 func (_Pool *PoolTransactor) SetDev(opts *bind.TransactOpts, dev common.Address) (*types.Transaction, error) { 938 return _Pool.contract.Transact(opts, "setDev", dev) 939 } 940 941 // SetDev is a paid mutator transaction binding the contract method 0xd477f05f. 942 // 943 // Solidity: function setDev(address dev) returns() 944 func (_Pool *PoolSession) SetDev(dev common.Address) (*types.Transaction, error) { 945 return _Pool.Contract.SetDev(&_Pool.TransactOpts, dev) 946 } 947 948 // SetDev is a paid mutator transaction binding the contract method 0xd477f05f. 949 // 950 // Solidity: function setDev(address dev) returns() 951 func (_Pool *PoolTransactorSession) SetDev(dev common.Address) (*types.Transaction, error) { 952 return _Pool.Contract.SetDev(&_Pool.TransactOpts, dev) 953 } 954 955 // SetHaircutRate is a paid mutator transaction binding the contract method 0xf57e84d5. 956 // 957 // Solidity: function setHaircutRate(uint256 haircutRate_) returns() 958 func (_Pool *PoolTransactor) SetHaircutRate(opts *bind.TransactOpts, haircutRate_ *big.Int) (*types.Transaction, error) { 959 return _Pool.contract.Transact(opts, "setHaircutRate", haircutRate_) 960 } 961 962 // SetHaircutRate is a paid mutator transaction binding the contract method 0xf57e84d5. 963 // 964 // Solidity: function setHaircutRate(uint256 haircutRate_) returns() 965 func (_Pool *PoolSession) SetHaircutRate(haircutRate_ *big.Int) (*types.Transaction, error) { 966 return _Pool.Contract.SetHaircutRate(&_Pool.TransactOpts, haircutRate_) 967 } 968 969 // SetHaircutRate is a paid mutator transaction binding the contract method 0xf57e84d5. 970 // 971 // Solidity: function setHaircutRate(uint256 haircutRate_) returns() 972 func (_Pool *PoolTransactorSession) SetHaircutRate(haircutRate_ *big.Int) (*types.Transaction, error) { 973 return _Pool.Contract.SetHaircutRate(&_Pool.TransactOpts, haircutRate_) 974 } 975 976 // SetMaxPriceDeviation is a paid mutator transaction binding the contract method 0x9ee4c057. 977 // 978 // Solidity: function setMaxPriceDeviation(uint256 maxPriceDeviation_) returns() 979 func (_Pool *PoolTransactor) SetMaxPriceDeviation(opts *bind.TransactOpts, maxPriceDeviation_ *big.Int) (*types.Transaction, error) { 980 return _Pool.contract.Transact(opts, "setMaxPriceDeviation", maxPriceDeviation_) 981 } 982 983 // SetMaxPriceDeviation is a paid mutator transaction binding the contract method 0x9ee4c057. 984 // 985 // Solidity: function setMaxPriceDeviation(uint256 maxPriceDeviation_) returns() 986 func (_Pool *PoolSession) SetMaxPriceDeviation(maxPriceDeviation_ *big.Int) (*types.Transaction, error) { 987 return _Pool.Contract.SetMaxPriceDeviation(&_Pool.TransactOpts, maxPriceDeviation_) 988 } 989 990 // SetMaxPriceDeviation is a paid mutator transaction binding the contract method 0x9ee4c057. 991 // 992 // Solidity: function setMaxPriceDeviation(uint256 maxPriceDeviation_) returns() 993 func (_Pool *PoolTransactorSession) SetMaxPriceDeviation(maxPriceDeviation_ *big.Int) (*types.Transaction, error) { 994 return _Pool.Contract.SetMaxPriceDeviation(&_Pool.TransactOpts, maxPriceDeviation_) 995 } 996 997 // SetPriceOracle is a paid mutator transaction binding the contract method 0x530e784f. 998 // 999 // Solidity: function setPriceOracle(address priceOracle) returns() 1000 func (_Pool *PoolTransactor) SetPriceOracle(opts *bind.TransactOpts, priceOracle common.Address) (*types.Transaction, error) { 1001 return _Pool.contract.Transact(opts, "setPriceOracle", priceOracle) 1002 } 1003 1004 // SetPriceOracle is a paid mutator transaction binding the contract method 0x530e784f. 1005 // 1006 // Solidity: function setPriceOracle(address priceOracle) returns() 1007 func (_Pool *PoolSession) SetPriceOracle(priceOracle common.Address) (*types.Transaction, error) { 1008 return _Pool.Contract.SetPriceOracle(&_Pool.TransactOpts, priceOracle) 1009 } 1010 1011 // SetPriceOracle is a paid mutator transaction binding the contract method 0x530e784f. 1012 // 1013 // Solidity: function setPriceOracle(address priceOracle) returns() 1014 func (_Pool *PoolTransactorSession) SetPriceOracle(priceOracle common.Address) (*types.Transaction, error) { 1015 return _Pool.Contract.SetPriceOracle(&_Pool.TransactOpts, priceOracle) 1016 } 1017 1018 // SetRetentionRatio is a paid mutator transaction binding the contract method 0x44db964a. 1019 // 1020 // Solidity: function setRetentionRatio(uint256 retentionRatio_) returns() 1021 func (_Pool *PoolTransactor) SetRetentionRatio(opts *bind.TransactOpts, retentionRatio_ *big.Int) (*types.Transaction, error) { 1022 return _Pool.contract.Transact(opts, "setRetentionRatio", retentionRatio_) 1023 } 1024 1025 // SetRetentionRatio is a paid mutator transaction binding the contract method 0x44db964a. 1026 // 1027 // Solidity: function setRetentionRatio(uint256 retentionRatio_) returns() 1028 func (_Pool *PoolSession) SetRetentionRatio(retentionRatio_ *big.Int) (*types.Transaction, error) { 1029 return _Pool.Contract.SetRetentionRatio(&_Pool.TransactOpts, retentionRatio_) 1030 } 1031 1032 // SetRetentionRatio is a paid mutator transaction binding the contract method 0x44db964a. 1033 // 1034 // Solidity: function setRetentionRatio(uint256 retentionRatio_) returns() 1035 func (_Pool *PoolTransactorSession) SetRetentionRatio(retentionRatio_ *big.Int) (*types.Transaction, error) { 1036 return _Pool.Contract.SetRetentionRatio(&_Pool.TransactOpts, retentionRatio_) 1037 } 1038 1039 // SetSlippageParams is a paid mutator transaction binding the contract method 0xdf220181. 1040 // 1041 // Solidity: function setSlippageParams(uint256 k_, uint256 n_, uint256 c1_, uint256 xThreshold_) returns() 1042 func (_Pool *PoolTransactor) SetSlippageParams(opts *bind.TransactOpts, k_ *big.Int, n_ *big.Int, c1_ *big.Int, xThreshold_ *big.Int) (*types.Transaction, error) { 1043 return _Pool.contract.Transact(opts, "setSlippageParams", k_, n_, c1_, xThreshold_) 1044 } 1045 1046 // SetSlippageParams is a paid mutator transaction binding the contract method 0xdf220181. 1047 // 1048 // Solidity: function setSlippageParams(uint256 k_, uint256 n_, uint256 c1_, uint256 xThreshold_) returns() 1049 func (_Pool *PoolSession) SetSlippageParams(k_ *big.Int, n_ *big.Int, c1_ *big.Int, xThreshold_ *big.Int) (*types.Transaction, error) { 1050 return _Pool.Contract.SetSlippageParams(&_Pool.TransactOpts, k_, n_, c1_, xThreshold_) 1051 } 1052 1053 // SetSlippageParams is a paid mutator transaction binding the contract method 0xdf220181. 1054 // 1055 // Solidity: function setSlippageParams(uint256 k_, uint256 n_, uint256 c1_, uint256 xThreshold_) returns() 1056 func (_Pool *PoolTransactorSession) SetSlippageParams(k_ *big.Int, n_ *big.Int, c1_ *big.Int, xThreshold_ *big.Int) (*types.Transaction, error) { 1057 return _Pool.Contract.SetSlippageParams(&_Pool.TransactOpts, k_, n_, c1_, xThreshold_) 1058 } 1059 1060 // Swap is a paid mutator transaction binding the contract method 0x9908fc8b. 1061 // 1062 // Solidity: function swap(address fromToken, address toToken, uint256 fromAmount, uint256 minimumToAmount, address to, uint256 deadline) returns(uint256 actualToAmount, uint256 haircut) 1063 func (_Pool *PoolTransactor) Swap(opts *bind.TransactOpts, fromToken common.Address, toToken common.Address, fromAmount *big.Int, minimumToAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1064 return _Pool.contract.Transact(opts, "swap", fromToken, toToken, fromAmount, minimumToAmount, to, deadline) 1065 } 1066 1067 // Swap is a paid mutator transaction binding the contract method 0x9908fc8b. 1068 // 1069 // Solidity: function swap(address fromToken, address toToken, uint256 fromAmount, uint256 minimumToAmount, address to, uint256 deadline) returns(uint256 actualToAmount, uint256 haircut) 1070 func (_Pool *PoolSession) Swap(fromToken common.Address, toToken common.Address, fromAmount *big.Int, minimumToAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1071 return _Pool.Contract.Swap(&_Pool.TransactOpts, fromToken, toToken, fromAmount, minimumToAmount, to, deadline) 1072 } 1073 1074 // Swap is a paid mutator transaction binding the contract method 0x9908fc8b. 1075 // 1076 // Solidity: function swap(address fromToken, address toToken, uint256 fromAmount, uint256 minimumToAmount, address to, uint256 deadline) returns(uint256 actualToAmount, uint256 haircut) 1077 func (_Pool *PoolTransactorSession) Swap(fromToken common.Address, toToken common.Address, fromAmount *big.Int, minimumToAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1078 return _Pool.Contract.Swap(&_Pool.TransactOpts, fromToken, toToken, fromAmount, minimumToAmount, to, deadline) 1079 } 1080 1081 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 1082 // 1083 // Solidity: function transferOwnership(address newOwner) returns() 1084 func (_Pool *PoolTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { 1085 return _Pool.contract.Transact(opts, "transferOwnership", newOwner) 1086 } 1087 1088 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 1089 // 1090 // Solidity: function transferOwnership(address newOwner) returns() 1091 func (_Pool *PoolSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 1092 return _Pool.Contract.TransferOwnership(&_Pool.TransactOpts, newOwner) 1093 } 1094 1095 // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. 1096 // 1097 // Solidity: function transferOwnership(address newOwner) returns() 1098 func (_Pool *PoolTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { 1099 return _Pool.Contract.TransferOwnership(&_Pool.TransactOpts, newOwner) 1100 } 1101 1102 // Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. 1103 // 1104 // Solidity: function unpause() returns() 1105 func (_Pool *PoolTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { 1106 return _Pool.contract.Transact(opts, "unpause") 1107 } 1108 1109 // Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. 1110 // 1111 // Solidity: function unpause() returns() 1112 func (_Pool *PoolSession) Unpause() (*types.Transaction, error) { 1113 return _Pool.Contract.Unpause(&_Pool.TransactOpts) 1114 } 1115 1116 // Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. 1117 // 1118 // Solidity: function unpause() returns() 1119 func (_Pool *PoolTransactorSession) Unpause() (*types.Transaction, error) { 1120 return _Pool.Contract.Unpause(&_Pool.TransactOpts) 1121 } 1122 1123 // Withdraw is a paid mutator transaction binding the contract method 0x09a5fca3. 1124 // 1125 // Solidity: function withdraw(address token, uint256 liquidity, uint256 minimumAmount, address to, uint256 deadline) returns(uint256 amount) 1126 func (_Pool *PoolTransactor) Withdraw(opts *bind.TransactOpts, token common.Address, liquidity *big.Int, minimumAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1127 return _Pool.contract.Transact(opts, "withdraw", token, liquidity, minimumAmount, to, deadline) 1128 } 1129 1130 // Withdraw is a paid mutator transaction binding the contract method 0x09a5fca3. 1131 // 1132 // Solidity: function withdraw(address token, uint256 liquidity, uint256 minimumAmount, address to, uint256 deadline) returns(uint256 amount) 1133 func (_Pool *PoolSession) Withdraw(token common.Address, liquidity *big.Int, minimumAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1134 return _Pool.Contract.Withdraw(&_Pool.TransactOpts, token, liquidity, minimumAmount, to, deadline) 1135 } 1136 1137 // Withdraw is a paid mutator transaction binding the contract method 0x09a5fca3. 1138 // 1139 // Solidity: function withdraw(address token, uint256 liquidity, uint256 minimumAmount, address to, uint256 deadline) returns(uint256 amount) 1140 func (_Pool *PoolTransactorSession) Withdraw(token common.Address, liquidity *big.Int, minimumAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1141 return _Pool.Contract.Withdraw(&_Pool.TransactOpts, token, liquidity, minimumAmount, to, deadline) 1142 } 1143 1144 // WithdrawFromOtherAsset is a paid mutator transaction binding the contract method 0x0f91f06f. 1145 // 1146 // Solidity: function withdrawFromOtherAsset(address initialToken, address wantedToken, uint256 liquidity, uint256 minimumAmount, address to, uint256 deadline) returns(uint256 amount) 1147 func (_Pool *PoolTransactor) WithdrawFromOtherAsset(opts *bind.TransactOpts, initialToken common.Address, wantedToken common.Address, liquidity *big.Int, minimumAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1148 return _Pool.contract.Transact(opts, "withdrawFromOtherAsset", initialToken, wantedToken, liquidity, minimumAmount, to, deadline) 1149 } 1150 1151 // WithdrawFromOtherAsset is a paid mutator transaction binding the contract method 0x0f91f06f. 1152 // 1153 // Solidity: function withdrawFromOtherAsset(address initialToken, address wantedToken, uint256 liquidity, uint256 minimumAmount, address to, uint256 deadline) returns(uint256 amount) 1154 func (_Pool *PoolSession) WithdrawFromOtherAsset(initialToken common.Address, wantedToken common.Address, liquidity *big.Int, minimumAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1155 return _Pool.Contract.WithdrawFromOtherAsset(&_Pool.TransactOpts, initialToken, wantedToken, liquidity, minimumAmount, to, deadline) 1156 } 1157 1158 // WithdrawFromOtherAsset is a paid mutator transaction binding the contract method 0x0f91f06f. 1159 // 1160 // Solidity: function withdrawFromOtherAsset(address initialToken, address wantedToken, uint256 liquidity, uint256 minimumAmount, address to, uint256 deadline) returns(uint256 amount) 1161 func (_Pool *PoolTransactorSession) WithdrawFromOtherAsset(initialToken common.Address, wantedToken common.Address, liquidity *big.Int, minimumAmount *big.Int, to common.Address, deadline *big.Int) (*types.Transaction, error) { 1162 return _Pool.Contract.WithdrawFromOtherAsset(&_Pool.TransactOpts, initialToken, wantedToken, liquidity, minimumAmount, to, deadline) 1163 } 1164 1165 // PoolAssetAddedIterator is returned from FilterAssetAdded and is used to iterate over the raw logs and unpacked data for AssetAdded events raised by the Pool contract. 1166 type PoolAssetAddedIterator struct { 1167 Event *PoolAssetAdded // Event containing the contract specifics and raw log 1168 1169 contract *bind.BoundContract // Generic contract to use for unpacking event data 1170 event string // Event name to use for unpacking event data 1171 1172 logs chan types.Log // Log channel receiving the found contract events 1173 sub ethereum.Subscription // Subscription for errors, completion and termination 1174 done bool // Whether the subscription completed delivering logs 1175 fail error // Occurred error to stop iteration 1176 } 1177 1178 // Next advances the iterator to the subsequent event, returning whether there 1179 // are any more events found. In case of a retrieval or parsing error, false is 1180 // returned and Error() can be queried for the exact failure. 1181 func (it *PoolAssetAddedIterator) Next() bool { 1182 // If the iterator failed, stop iterating 1183 if it.fail != nil { 1184 return false 1185 } 1186 // If the iterator completed, deliver directly whatever's available 1187 if it.done { 1188 select { 1189 case log := <-it.logs: 1190 it.Event = new(PoolAssetAdded) 1191 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1192 it.fail = err 1193 return false 1194 } 1195 it.Event.Raw = log 1196 return true 1197 1198 default: 1199 return false 1200 } 1201 } 1202 // Iterator still in progress, wait for either a data or an error event 1203 select { 1204 case log := <-it.logs: 1205 it.Event = new(PoolAssetAdded) 1206 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1207 it.fail = err 1208 return false 1209 } 1210 it.Event.Raw = log 1211 return true 1212 1213 case err := <-it.sub.Err(): 1214 it.done = true 1215 it.fail = err 1216 return it.Next() 1217 } 1218 } 1219 1220 // Error returns any retrieval or parsing error occurred during filtering. 1221 func (it *PoolAssetAddedIterator) Error() error { 1222 return it.fail 1223 } 1224 1225 // Close terminates the iteration process, releasing any pending underlying 1226 // resources. 1227 func (it *PoolAssetAddedIterator) Close() error { 1228 it.sub.Unsubscribe() 1229 return nil 1230 } 1231 1232 // PoolAssetAdded represents a AssetAdded event raised by the Pool contract. 1233 type PoolAssetAdded struct { 1234 Token common.Address 1235 Asset common.Address 1236 Raw types.Log // Blockchain specific contextual infos 1237 } 1238 1239 // FilterAssetAdded is a free log retrieval operation binding the contract event 0x0bb5715f0f217c2fe9a0c877ea87d474380c641102f3440ee2a4c8b9d9790918. 1240 // 1241 // Solidity: event AssetAdded(address indexed token, address indexed asset) 1242 func (_Pool *PoolFilterer) FilterAssetAdded(opts *bind.FilterOpts, token []common.Address, asset []common.Address) (*PoolAssetAddedIterator, error) { 1243 1244 var tokenRule []interface{} 1245 for _, tokenItem := range token { 1246 tokenRule = append(tokenRule, tokenItem) 1247 } 1248 var assetRule []interface{} 1249 for _, assetItem := range asset { 1250 assetRule = append(assetRule, assetItem) 1251 } 1252 1253 logs, sub, err := _Pool.contract.FilterLogs(opts, "AssetAdded", tokenRule, assetRule) 1254 if err != nil { 1255 return nil, err 1256 } 1257 return &PoolAssetAddedIterator{contract: _Pool.contract, event: "AssetAdded", logs: logs, sub: sub}, nil 1258 } 1259 1260 // WatchAssetAdded is a free log subscription operation binding the contract event 0x0bb5715f0f217c2fe9a0c877ea87d474380c641102f3440ee2a4c8b9d9790918. 1261 // 1262 // Solidity: event AssetAdded(address indexed token, address indexed asset) 1263 func (_Pool *PoolFilterer) WatchAssetAdded(opts *bind.WatchOpts, sink chan<- *PoolAssetAdded, token []common.Address, asset []common.Address) (event.Subscription, error) { 1264 1265 var tokenRule []interface{} 1266 for _, tokenItem := range token { 1267 tokenRule = append(tokenRule, tokenItem) 1268 } 1269 var assetRule []interface{} 1270 for _, assetItem := range asset { 1271 assetRule = append(assetRule, assetItem) 1272 } 1273 1274 logs, sub, err := _Pool.contract.WatchLogs(opts, "AssetAdded", tokenRule, assetRule) 1275 if err != nil { 1276 return nil, err 1277 } 1278 return event.NewSubscription(func(quit <-chan struct{}) error { 1279 defer sub.Unsubscribe() 1280 for { 1281 select { 1282 case log := <-logs: 1283 // New log arrived, parse the event and forward to the user 1284 event := new(PoolAssetAdded) 1285 if err := _Pool.contract.UnpackLog(event, "AssetAdded", log); err != nil { 1286 return err 1287 } 1288 event.Raw = log 1289 1290 select { 1291 case sink <- event: 1292 case err := <-sub.Err(): 1293 return err 1294 case <-quit: 1295 return nil 1296 } 1297 case err := <-sub.Err(): 1298 return err 1299 case <-quit: 1300 return nil 1301 } 1302 } 1303 }), nil 1304 } 1305 1306 // ParseAssetAdded is a log parse operation binding the contract event 0x0bb5715f0f217c2fe9a0c877ea87d474380c641102f3440ee2a4c8b9d9790918. 1307 // 1308 // Solidity: event AssetAdded(address indexed token, address indexed asset) 1309 func (_Pool *PoolFilterer) ParseAssetAdded(log types.Log) (*PoolAssetAdded, error) { 1310 event := new(PoolAssetAdded) 1311 if err := _Pool.contract.UnpackLog(event, "AssetAdded", log); err != nil { 1312 return nil, err 1313 } 1314 event.Raw = log 1315 return event, nil 1316 } 1317 1318 // PoolDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Pool contract. 1319 type PoolDepositIterator struct { 1320 Event *PoolDeposit // Event containing the contract specifics and raw log 1321 1322 contract *bind.BoundContract // Generic contract to use for unpacking event data 1323 event string // Event name to use for unpacking event data 1324 1325 logs chan types.Log // Log channel receiving the found contract events 1326 sub ethereum.Subscription // Subscription for errors, completion and termination 1327 done bool // Whether the subscription completed delivering logs 1328 fail error // Occurred error to stop iteration 1329 } 1330 1331 // Next advances the iterator to the subsequent event, returning whether there 1332 // are any more events found. In case of a retrieval or parsing error, false is 1333 // returned and Error() can be queried for the exact failure. 1334 func (it *PoolDepositIterator) Next() bool { 1335 // If the iterator failed, stop iterating 1336 if it.fail != nil { 1337 return false 1338 } 1339 // If the iterator completed, deliver directly whatever's available 1340 if it.done { 1341 select { 1342 case log := <-it.logs: 1343 it.Event = new(PoolDeposit) 1344 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1345 it.fail = err 1346 return false 1347 } 1348 it.Event.Raw = log 1349 return true 1350 1351 default: 1352 return false 1353 } 1354 } 1355 // Iterator still in progress, wait for either a data or an error event 1356 select { 1357 case log := <-it.logs: 1358 it.Event = new(PoolDeposit) 1359 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1360 it.fail = err 1361 return false 1362 } 1363 it.Event.Raw = log 1364 return true 1365 1366 case err := <-it.sub.Err(): 1367 it.done = true 1368 it.fail = err 1369 return it.Next() 1370 } 1371 } 1372 1373 // Error returns any retrieval or parsing error occurred during filtering. 1374 func (it *PoolDepositIterator) Error() error { 1375 return it.fail 1376 } 1377 1378 // Close terminates the iteration process, releasing any pending underlying 1379 // resources. 1380 func (it *PoolDepositIterator) Close() error { 1381 it.sub.Unsubscribe() 1382 return nil 1383 } 1384 1385 // PoolDeposit represents a Deposit event raised by the Pool contract. 1386 type PoolDeposit struct { 1387 Sender common.Address 1388 Token common.Address 1389 Amount *big.Int 1390 Liquidity *big.Int 1391 To common.Address 1392 Raw types.Log // Blockchain specific contextual infos 1393 } 1394 1395 // FilterDeposit is a free log retrieval operation binding the contract event 0xf5dd9317b9e63ac316ce44acc85f670b54b339cfa3e9076e1dd55065b922314b. 1396 // 1397 // Solidity: event Deposit(address indexed sender, address token, uint256 amount, uint256 liquidity, address indexed to) 1398 func (_Pool *PoolFilterer) FilterDeposit(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*PoolDepositIterator, error) { 1399 1400 var senderRule []interface{} 1401 for _, senderItem := range sender { 1402 senderRule = append(senderRule, senderItem) 1403 } 1404 1405 var toRule []interface{} 1406 for _, toItem := range to { 1407 toRule = append(toRule, toItem) 1408 } 1409 1410 logs, sub, err := _Pool.contract.FilterLogs(opts, "Deposit", senderRule, toRule) 1411 if err != nil { 1412 return nil, err 1413 } 1414 return &PoolDepositIterator{contract: _Pool.contract, event: "Deposit", logs: logs, sub: sub}, nil 1415 } 1416 1417 // WatchDeposit is a free log subscription operation binding the contract event 0xf5dd9317b9e63ac316ce44acc85f670b54b339cfa3e9076e1dd55065b922314b. 1418 // 1419 // Solidity: event Deposit(address indexed sender, address token, uint256 amount, uint256 liquidity, address indexed to) 1420 func (_Pool *PoolFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *PoolDeposit, sender []common.Address, to []common.Address) (event.Subscription, error) { 1421 1422 var senderRule []interface{} 1423 for _, senderItem := range sender { 1424 senderRule = append(senderRule, senderItem) 1425 } 1426 1427 var toRule []interface{} 1428 for _, toItem := range to { 1429 toRule = append(toRule, toItem) 1430 } 1431 1432 logs, sub, err := _Pool.contract.WatchLogs(opts, "Deposit", senderRule, toRule) 1433 if err != nil { 1434 return nil, err 1435 } 1436 return event.NewSubscription(func(quit <-chan struct{}) error { 1437 defer sub.Unsubscribe() 1438 for { 1439 select { 1440 case log := <-logs: 1441 // New log arrived, parse the event and forward to the user 1442 event := new(PoolDeposit) 1443 if err := _Pool.contract.UnpackLog(event, "Deposit", log); err != nil { 1444 return err 1445 } 1446 event.Raw = log 1447 1448 select { 1449 case sink <- event: 1450 case err := <-sub.Err(): 1451 return err 1452 case <-quit: 1453 return nil 1454 } 1455 case err := <-sub.Err(): 1456 return err 1457 case <-quit: 1458 return nil 1459 } 1460 } 1461 }), nil 1462 } 1463 1464 // ParseDeposit is a log parse operation binding the contract event 0xf5dd9317b9e63ac316ce44acc85f670b54b339cfa3e9076e1dd55065b922314b. 1465 // 1466 // Solidity: event Deposit(address indexed sender, address token, uint256 amount, uint256 liquidity, address indexed to) 1467 func (_Pool *PoolFilterer) ParseDeposit(log types.Log) (*PoolDeposit, error) { 1468 event := new(PoolDeposit) 1469 if err := _Pool.contract.UnpackLog(event, "Deposit", log); err != nil { 1470 return nil, err 1471 } 1472 event.Raw = log 1473 return event, nil 1474 } 1475 1476 // PoolDevUpdatedIterator is returned from FilterDevUpdated and is used to iterate over the raw logs and unpacked data for DevUpdated events raised by the Pool contract. 1477 type PoolDevUpdatedIterator struct { 1478 Event *PoolDevUpdated // Event containing the contract specifics and raw log 1479 1480 contract *bind.BoundContract // Generic contract to use for unpacking event data 1481 event string // Event name to use for unpacking event data 1482 1483 logs chan types.Log // Log channel receiving the found contract events 1484 sub ethereum.Subscription // Subscription for errors, completion and termination 1485 done bool // Whether the subscription completed delivering logs 1486 fail error // Occurred error to stop iteration 1487 } 1488 1489 // Next advances the iterator to the subsequent event, returning whether there 1490 // are any more events found. In case of a retrieval or parsing error, false is 1491 // returned and Error() can be queried for the exact failure. 1492 func (it *PoolDevUpdatedIterator) Next() bool { 1493 // If the iterator failed, stop iterating 1494 if it.fail != nil { 1495 return false 1496 } 1497 // If the iterator completed, deliver directly whatever's available 1498 if it.done { 1499 select { 1500 case log := <-it.logs: 1501 it.Event = new(PoolDevUpdated) 1502 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1503 it.fail = err 1504 return false 1505 } 1506 it.Event.Raw = log 1507 return true 1508 1509 default: 1510 return false 1511 } 1512 } 1513 // Iterator still in progress, wait for either a data or an error event 1514 select { 1515 case log := <-it.logs: 1516 it.Event = new(PoolDevUpdated) 1517 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1518 it.fail = err 1519 return false 1520 } 1521 it.Event.Raw = log 1522 return true 1523 1524 case err := <-it.sub.Err(): 1525 it.done = true 1526 it.fail = err 1527 return it.Next() 1528 } 1529 } 1530 1531 // Error returns any retrieval or parsing error occurred during filtering. 1532 func (it *PoolDevUpdatedIterator) Error() error { 1533 return it.fail 1534 } 1535 1536 // Close terminates the iteration process, releasing any pending underlying 1537 // resources. 1538 func (it *PoolDevUpdatedIterator) Close() error { 1539 it.sub.Unsubscribe() 1540 return nil 1541 } 1542 1543 // PoolDevUpdated represents a DevUpdated event raised by the Pool contract. 1544 type PoolDevUpdated struct { 1545 PreviousDev common.Address 1546 NewDev common.Address 1547 Raw types.Log // Blockchain specific contextual infos 1548 } 1549 1550 // FilterDevUpdated is a free log retrieval operation binding the contract event 0xaa37e6ba252409ccb1daf704a52d3f2fb61265b2f480371d6041193f1cf16ac2. 1551 // 1552 // Solidity: event DevUpdated(address indexed previousDev, address indexed newDev) 1553 func (_Pool *PoolFilterer) FilterDevUpdated(opts *bind.FilterOpts, previousDev []common.Address, newDev []common.Address) (*PoolDevUpdatedIterator, error) { 1554 1555 var previousDevRule []interface{} 1556 for _, previousDevItem := range previousDev { 1557 previousDevRule = append(previousDevRule, previousDevItem) 1558 } 1559 var newDevRule []interface{} 1560 for _, newDevItem := range newDev { 1561 newDevRule = append(newDevRule, newDevItem) 1562 } 1563 1564 logs, sub, err := _Pool.contract.FilterLogs(opts, "DevUpdated", previousDevRule, newDevRule) 1565 if err != nil { 1566 return nil, err 1567 } 1568 return &PoolDevUpdatedIterator{contract: _Pool.contract, event: "DevUpdated", logs: logs, sub: sub}, nil 1569 } 1570 1571 // WatchDevUpdated is a free log subscription operation binding the contract event 0xaa37e6ba252409ccb1daf704a52d3f2fb61265b2f480371d6041193f1cf16ac2. 1572 // 1573 // Solidity: event DevUpdated(address indexed previousDev, address indexed newDev) 1574 func (_Pool *PoolFilterer) WatchDevUpdated(opts *bind.WatchOpts, sink chan<- *PoolDevUpdated, previousDev []common.Address, newDev []common.Address) (event.Subscription, error) { 1575 1576 var previousDevRule []interface{} 1577 for _, previousDevItem := range previousDev { 1578 previousDevRule = append(previousDevRule, previousDevItem) 1579 } 1580 var newDevRule []interface{} 1581 for _, newDevItem := range newDev { 1582 newDevRule = append(newDevRule, newDevItem) 1583 } 1584 1585 logs, sub, err := _Pool.contract.WatchLogs(opts, "DevUpdated", previousDevRule, newDevRule) 1586 if err != nil { 1587 return nil, err 1588 } 1589 return event.NewSubscription(func(quit <-chan struct{}) error { 1590 defer sub.Unsubscribe() 1591 for { 1592 select { 1593 case log := <-logs: 1594 // New log arrived, parse the event and forward to the user 1595 event := new(PoolDevUpdated) 1596 if err := _Pool.contract.UnpackLog(event, "DevUpdated", log); err != nil { 1597 return err 1598 } 1599 event.Raw = log 1600 1601 select { 1602 case sink <- event: 1603 case err := <-sub.Err(): 1604 return err 1605 case <-quit: 1606 return nil 1607 } 1608 case err := <-sub.Err(): 1609 return err 1610 case <-quit: 1611 return nil 1612 } 1613 } 1614 }), nil 1615 } 1616 1617 // ParseDevUpdated is a log parse operation binding the contract event 0xaa37e6ba252409ccb1daf704a52d3f2fb61265b2f480371d6041193f1cf16ac2. 1618 // 1619 // Solidity: event DevUpdated(address indexed previousDev, address indexed newDev) 1620 func (_Pool *PoolFilterer) ParseDevUpdated(log types.Log) (*PoolDevUpdated, error) { 1621 event := new(PoolDevUpdated) 1622 if err := _Pool.contract.UnpackLog(event, "DevUpdated", log); err != nil { 1623 return nil, err 1624 } 1625 event.Raw = log 1626 return event, nil 1627 } 1628 1629 // PoolHaircutRateUpdatedIterator is returned from FilterHaircutRateUpdated and is used to iterate over the raw logs and unpacked data for HaircutRateUpdated events raised by the Pool contract. 1630 type PoolHaircutRateUpdatedIterator struct { 1631 Event *PoolHaircutRateUpdated // Event containing the contract specifics and raw log 1632 1633 contract *bind.BoundContract // Generic contract to use for unpacking event data 1634 event string // Event name to use for unpacking event data 1635 1636 logs chan types.Log // Log channel receiving the found contract events 1637 sub ethereum.Subscription // Subscription for errors, completion and termination 1638 done bool // Whether the subscription completed delivering logs 1639 fail error // Occurred error to stop iteration 1640 } 1641 1642 // Next advances the iterator to the subsequent event, returning whether there 1643 // are any more events found. In case of a retrieval or parsing error, false is 1644 // returned and Error() can be queried for the exact failure. 1645 func (it *PoolHaircutRateUpdatedIterator) Next() bool { 1646 // If the iterator failed, stop iterating 1647 if it.fail != nil { 1648 return false 1649 } 1650 // If the iterator completed, deliver directly whatever's available 1651 if it.done { 1652 select { 1653 case log := <-it.logs: 1654 it.Event = new(PoolHaircutRateUpdated) 1655 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1656 it.fail = err 1657 return false 1658 } 1659 it.Event.Raw = log 1660 return true 1661 1662 default: 1663 return false 1664 } 1665 } 1666 // Iterator still in progress, wait for either a data or an error event 1667 select { 1668 case log := <-it.logs: 1669 it.Event = new(PoolHaircutRateUpdated) 1670 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1671 it.fail = err 1672 return false 1673 } 1674 it.Event.Raw = log 1675 return true 1676 1677 case err := <-it.sub.Err(): 1678 it.done = true 1679 it.fail = err 1680 return it.Next() 1681 } 1682 } 1683 1684 // Error returns any retrieval or parsing error occurred during filtering. 1685 func (it *PoolHaircutRateUpdatedIterator) Error() error { 1686 return it.fail 1687 } 1688 1689 // Close terminates the iteration process, releasing any pending underlying 1690 // resources. 1691 func (it *PoolHaircutRateUpdatedIterator) Close() error { 1692 it.sub.Unsubscribe() 1693 return nil 1694 } 1695 1696 // PoolHaircutRateUpdated represents a HaircutRateUpdated event raised by the Pool contract. 1697 type PoolHaircutRateUpdated struct { 1698 PreviousHaircut *big.Int 1699 NewHaircut *big.Int 1700 Raw types.Log // Blockchain specific contextual infos 1701 } 1702 1703 // FilterHaircutRateUpdated is a free log retrieval operation binding the contract event 0xbb59363309f944f517c724d17a8f3c89d62efc951e2d7768f7a9d7f307bcad7f. 1704 // 1705 // Solidity: event HaircutRateUpdated(uint256 previousHaircut, uint256 newHaircut) 1706 func (_Pool *PoolFilterer) FilterHaircutRateUpdated(opts *bind.FilterOpts) (*PoolHaircutRateUpdatedIterator, error) { 1707 1708 logs, sub, err := _Pool.contract.FilterLogs(opts, "HaircutRateUpdated") 1709 if err != nil { 1710 return nil, err 1711 } 1712 return &PoolHaircutRateUpdatedIterator{contract: _Pool.contract, event: "HaircutRateUpdated", logs: logs, sub: sub}, nil 1713 } 1714 1715 // WatchHaircutRateUpdated is a free log subscription operation binding the contract event 0xbb59363309f944f517c724d17a8f3c89d62efc951e2d7768f7a9d7f307bcad7f. 1716 // 1717 // Solidity: event HaircutRateUpdated(uint256 previousHaircut, uint256 newHaircut) 1718 func (_Pool *PoolFilterer) WatchHaircutRateUpdated(opts *bind.WatchOpts, sink chan<- *PoolHaircutRateUpdated) (event.Subscription, error) { 1719 1720 logs, sub, err := _Pool.contract.WatchLogs(opts, "HaircutRateUpdated") 1721 if err != nil { 1722 return nil, err 1723 } 1724 return event.NewSubscription(func(quit <-chan struct{}) error { 1725 defer sub.Unsubscribe() 1726 for { 1727 select { 1728 case log := <-logs: 1729 // New log arrived, parse the event and forward to the user 1730 event := new(PoolHaircutRateUpdated) 1731 if err := _Pool.contract.UnpackLog(event, "HaircutRateUpdated", log); err != nil { 1732 return err 1733 } 1734 event.Raw = log 1735 1736 select { 1737 case sink <- event: 1738 case err := <-sub.Err(): 1739 return err 1740 case <-quit: 1741 return nil 1742 } 1743 case err := <-sub.Err(): 1744 return err 1745 case <-quit: 1746 return nil 1747 } 1748 } 1749 }), nil 1750 } 1751 1752 // ParseHaircutRateUpdated is a log parse operation binding the contract event 0xbb59363309f944f517c724d17a8f3c89d62efc951e2d7768f7a9d7f307bcad7f. 1753 // 1754 // Solidity: event HaircutRateUpdated(uint256 previousHaircut, uint256 newHaircut) 1755 func (_Pool *PoolFilterer) ParseHaircutRateUpdated(log types.Log) (*PoolHaircutRateUpdated, error) { 1756 event := new(PoolHaircutRateUpdated) 1757 if err := _Pool.contract.UnpackLog(event, "HaircutRateUpdated", log); err != nil { 1758 return nil, err 1759 } 1760 event.Raw = log 1761 return event, nil 1762 } 1763 1764 // PoolOracleUpdatedIterator is returned from FilterOracleUpdated and is used to iterate over the raw logs and unpacked data for OracleUpdated events raised by the Pool contract. 1765 type PoolOracleUpdatedIterator struct { 1766 Event *PoolOracleUpdated // Event containing the contract specifics and raw log 1767 1768 contract *bind.BoundContract // Generic contract to use for unpacking event data 1769 event string // Event name to use for unpacking event data 1770 1771 logs chan types.Log // Log channel receiving the found contract events 1772 sub ethereum.Subscription // Subscription for errors, completion and termination 1773 done bool // Whether the subscription completed delivering logs 1774 fail error // Occurred error to stop iteration 1775 } 1776 1777 // Next advances the iterator to the subsequent event, returning whether there 1778 // are any more events found. In case of a retrieval or parsing error, false is 1779 // returned and Error() can be queried for the exact failure. 1780 func (it *PoolOracleUpdatedIterator) Next() bool { 1781 // If the iterator failed, stop iterating 1782 if it.fail != nil { 1783 return false 1784 } 1785 // If the iterator completed, deliver directly whatever's available 1786 if it.done { 1787 select { 1788 case log := <-it.logs: 1789 it.Event = new(PoolOracleUpdated) 1790 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1791 it.fail = err 1792 return false 1793 } 1794 it.Event.Raw = log 1795 return true 1796 1797 default: 1798 return false 1799 } 1800 } 1801 // Iterator still in progress, wait for either a data or an error event 1802 select { 1803 case log := <-it.logs: 1804 it.Event = new(PoolOracleUpdated) 1805 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1806 it.fail = err 1807 return false 1808 } 1809 it.Event.Raw = log 1810 return true 1811 1812 case err := <-it.sub.Err(): 1813 it.done = true 1814 it.fail = err 1815 return it.Next() 1816 } 1817 } 1818 1819 // Error returns any retrieval or parsing error occurred during filtering. 1820 func (it *PoolOracleUpdatedIterator) Error() error { 1821 return it.fail 1822 } 1823 1824 // Close terminates the iteration process, releasing any pending underlying 1825 // resources. 1826 func (it *PoolOracleUpdatedIterator) Close() error { 1827 it.sub.Unsubscribe() 1828 return nil 1829 } 1830 1831 // PoolOracleUpdated represents a OracleUpdated event raised by the Pool contract. 1832 type PoolOracleUpdated struct { 1833 PreviousOracle common.Address 1834 NewOracle common.Address 1835 Raw types.Log // Blockchain specific contextual infos 1836 } 1837 1838 // FilterOracleUpdated is a free log retrieval operation binding the contract event 0x078c3b417dadf69374a59793b829c52001247130433427049317bde56607b1b7. 1839 // 1840 // Solidity: event OracleUpdated(address indexed previousOracle, address indexed newOracle) 1841 func (_Pool *PoolFilterer) FilterOracleUpdated(opts *bind.FilterOpts, previousOracle []common.Address, newOracle []common.Address) (*PoolOracleUpdatedIterator, error) { 1842 1843 var previousOracleRule []interface{} 1844 for _, previousOracleItem := range previousOracle { 1845 previousOracleRule = append(previousOracleRule, previousOracleItem) 1846 } 1847 var newOracleRule []interface{} 1848 for _, newOracleItem := range newOracle { 1849 newOracleRule = append(newOracleRule, newOracleItem) 1850 } 1851 1852 logs, sub, err := _Pool.contract.FilterLogs(opts, "OracleUpdated", previousOracleRule, newOracleRule) 1853 if err != nil { 1854 return nil, err 1855 } 1856 return &PoolOracleUpdatedIterator{contract: _Pool.contract, event: "OracleUpdated", logs: logs, sub: sub}, nil 1857 } 1858 1859 // WatchOracleUpdated is a free log subscription operation binding the contract event 0x078c3b417dadf69374a59793b829c52001247130433427049317bde56607b1b7. 1860 // 1861 // Solidity: event OracleUpdated(address indexed previousOracle, address indexed newOracle) 1862 func (_Pool *PoolFilterer) WatchOracleUpdated(opts *bind.WatchOpts, sink chan<- *PoolOracleUpdated, previousOracle []common.Address, newOracle []common.Address) (event.Subscription, error) { 1863 1864 var previousOracleRule []interface{} 1865 for _, previousOracleItem := range previousOracle { 1866 previousOracleRule = append(previousOracleRule, previousOracleItem) 1867 } 1868 var newOracleRule []interface{} 1869 for _, newOracleItem := range newOracle { 1870 newOracleRule = append(newOracleRule, newOracleItem) 1871 } 1872 1873 logs, sub, err := _Pool.contract.WatchLogs(opts, "OracleUpdated", previousOracleRule, newOracleRule) 1874 if err != nil { 1875 return nil, err 1876 } 1877 return event.NewSubscription(func(quit <-chan struct{}) error { 1878 defer sub.Unsubscribe() 1879 for { 1880 select { 1881 case log := <-logs: 1882 // New log arrived, parse the event and forward to the user 1883 event := new(PoolOracleUpdated) 1884 if err := _Pool.contract.UnpackLog(event, "OracleUpdated", log); err != nil { 1885 return err 1886 } 1887 event.Raw = log 1888 1889 select { 1890 case sink <- event: 1891 case err := <-sub.Err(): 1892 return err 1893 case <-quit: 1894 return nil 1895 } 1896 case err := <-sub.Err(): 1897 return err 1898 case <-quit: 1899 return nil 1900 } 1901 } 1902 }), nil 1903 } 1904 1905 // ParseOracleUpdated is a log parse operation binding the contract event 0x078c3b417dadf69374a59793b829c52001247130433427049317bde56607b1b7. 1906 // 1907 // Solidity: event OracleUpdated(address indexed previousOracle, address indexed newOracle) 1908 func (_Pool *PoolFilterer) ParseOracleUpdated(log types.Log) (*PoolOracleUpdated, error) { 1909 event := new(PoolOracleUpdated) 1910 if err := _Pool.contract.UnpackLog(event, "OracleUpdated", log); err != nil { 1911 return nil, err 1912 } 1913 event.Raw = log 1914 return event, nil 1915 } 1916 1917 // PoolOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Pool contract. 1918 type PoolOwnershipTransferredIterator struct { 1919 Event *PoolOwnershipTransferred // Event containing the contract specifics and raw log 1920 1921 contract *bind.BoundContract // Generic contract to use for unpacking event data 1922 event string // Event name to use for unpacking event data 1923 1924 logs chan types.Log // Log channel receiving the found contract events 1925 sub ethereum.Subscription // Subscription for errors, completion and termination 1926 done bool // Whether the subscription completed delivering logs 1927 fail error // Occurred error to stop iteration 1928 } 1929 1930 // Next advances the iterator to the subsequent event, returning whether there 1931 // are any more events found. In case of a retrieval or parsing error, false is 1932 // returned and Error() can be queried for the exact failure. 1933 func (it *PoolOwnershipTransferredIterator) Next() bool { 1934 // If the iterator failed, stop iterating 1935 if it.fail != nil { 1936 return false 1937 } 1938 // If the iterator completed, deliver directly whatever's available 1939 if it.done { 1940 select { 1941 case log := <-it.logs: 1942 it.Event = new(PoolOwnershipTransferred) 1943 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1944 it.fail = err 1945 return false 1946 } 1947 it.Event.Raw = log 1948 return true 1949 1950 default: 1951 return false 1952 } 1953 } 1954 // Iterator still in progress, wait for either a data or an error event 1955 select { 1956 case log := <-it.logs: 1957 it.Event = new(PoolOwnershipTransferred) 1958 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 1959 it.fail = err 1960 return false 1961 } 1962 it.Event.Raw = log 1963 return true 1964 1965 case err := <-it.sub.Err(): 1966 it.done = true 1967 it.fail = err 1968 return it.Next() 1969 } 1970 } 1971 1972 // Error returns any retrieval or parsing error occurred during filtering. 1973 func (it *PoolOwnershipTransferredIterator) Error() error { 1974 return it.fail 1975 } 1976 1977 // Close terminates the iteration process, releasing any pending underlying 1978 // resources. 1979 func (it *PoolOwnershipTransferredIterator) Close() error { 1980 it.sub.Unsubscribe() 1981 return nil 1982 } 1983 1984 // PoolOwnershipTransferred represents a OwnershipTransferred event raised by the Pool contract. 1985 type PoolOwnershipTransferred struct { 1986 PreviousOwner common.Address 1987 NewOwner common.Address 1988 Raw types.Log // Blockchain specific contextual infos 1989 } 1990 1991 // FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 1992 // 1993 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 1994 func (_Pool *PoolFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*PoolOwnershipTransferredIterator, error) { 1995 1996 var previousOwnerRule []interface{} 1997 for _, previousOwnerItem := range previousOwner { 1998 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 1999 } 2000 var newOwnerRule []interface{} 2001 for _, newOwnerItem := range newOwner { 2002 newOwnerRule = append(newOwnerRule, newOwnerItem) 2003 } 2004 2005 logs, sub, err := _Pool.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 2006 if err != nil { 2007 return nil, err 2008 } 2009 return &PoolOwnershipTransferredIterator{contract: _Pool.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil 2010 } 2011 2012 // WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 2013 // 2014 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 2015 func (_Pool *PoolFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PoolOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { 2016 2017 var previousOwnerRule []interface{} 2018 for _, previousOwnerItem := range previousOwner { 2019 previousOwnerRule = append(previousOwnerRule, previousOwnerItem) 2020 } 2021 var newOwnerRule []interface{} 2022 for _, newOwnerItem := range newOwner { 2023 newOwnerRule = append(newOwnerRule, newOwnerItem) 2024 } 2025 2026 logs, sub, err := _Pool.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) 2027 if err != nil { 2028 return nil, err 2029 } 2030 return event.NewSubscription(func(quit <-chan struct{}) error { 2031 defer sub.Unsubscribe() 2032 for { 2033 select { 2034 case log := <-logs: 2035 // New log arrived, parse the event and forward to the user 2036 event := new(PoolOwnershipTransferred) 2037 if err := _Pool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 2038 return err 2039 } 2040 event.Raw = log 2041 2042 select { 2043 case sink <- event: 2044 case err := <-sub.Err(): 2045 return err 2046 case <-quit: 2047 return nil 2048 } 2049 case err := <-sub.Err(): 2050 return err 2051 case <-quit: 2052 return nil 2053 } 2054 } 2055 }), nil 2056 } 2057 2058 // ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. 2059 // 2060 // Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) 2061 func (_Pool *PoolFilterer) ParseOwnershipTransferred(log types.Log) (*PoolOwnershipTransferred, error) { 2062 event := new(PoolOwnershipTransferred) 2063 if err := _Pool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { 2064 return nil, err 2065 } 2066 event.Raw = log 2067 return event, nil 2068 } 2069 2070 // PoolPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Pool contract. 2071 type PoolPausedIterator struct { 2072 Event *PoolPaused // Event containing the contract specifics and raw log 2073 2074 contract *bind.BoundContract // Generic contract to use for unpacking event data 2075 event string // Event name to use for unpacking event data 2076 2077 logs chan types.Log // Log channel receiving the found contract events 2078 sub ethereum.Subscription // Subscription for errors, completion and termination 2079 done bool // Whether the subscription completed delivering logs 2080 fail error // Occurred error to stop iteration 2081 } 2082 2083 // Next advances the iterator to the subsequent event, returning whether there 2084 // are any more events found. In case of a retrieval or parsing error, false is 2085 // returned and Error() can be queried for the exact failure. 2086 func (it *PoolPausedIterator) Next() bool { 2087 // If the iterator failed, stop iterating 2088 if it.fail != nil { 2089 return false 2090 } 2091 // If the iterator completed, deliver directly whatever's available 2092 if it.done { 2093 select { 2094 case log := <-it.logs: 2095 it.Event = new(PoolPaused) 2096 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2097 it.fail = err 2098 return false 2099 } 2100 it.Event.Raw = log 2101 return true 2102 2103 default: 2104 return false 2105 } 2106 } 2107 // Iterator still in progress, wait for either a data or an error event 2108 select { 2109 case log := <-it.logs: 2110 it.Event = new(PoolPaused) 2111 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2112 it.fail = err 2113 return false 2114 } 2115 it.Event.Raw = log 2116 return true 2117 2118 case err := <-it.sub.Err(): 2119 it.done = true 2120 it.fail = err 2121 return it.Next() 2122 } 2123 } 2124 2125 // Error returns any retrieval or parsing error occurred during filtering. 2126 func (it *PoolPausedIterator) Error() error { 2127 return it.fail 2128 } 2129 2130 // Close terminates the iteration process, releasing any pending underlying 2131 // resources. 2132 func (it *PoolPausedIterator) Close() error { 2133 it.sub.Unsubscribe() 2134 return nil 2135 } 2136 2137 // PoolPaused represents a Paused event raised by the Pool contract. 2138 type PoolPaused struct { 2139 Account common.Address 2140 Raw types.Log // Blockchain specific contextual infos 2141 } 2142 2143 // FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. 2144 // 2145 // Solidity: event Paused(address account) 2146 func (_Pool *PoolFilterer) FilterPaused(opts *bind.FilterOpts) (*PoolPausedIterator, error) { 2147 2148 logs, sub, err := _Pool.contract.FilterLogs(opts, "Paused") 2149 if err != nil { 2150 return nil, err 2151 } 2152 return &PoolPausedIterator{contract: _Pool.contract, event: "Paused", logs: logs, sub: sub}, nil 2153 } 2154 2155 // WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. 2156 // 2157 // Solidity: event Paused(address account) 2158 func (_Pool *PoolFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PoolPaused) (event.Subscription, error) { 2159 2160 logs, sub, err := _Pool.contract.WatchLogs(opts, "Paused") 2161 if err != nil { 2162 return nil, err 2163 } 2164 return event.NewSubscription(func(quit <-chan struct{}) error { 2165 defer sub.Unsubscribe() 2166 for { 2167 select { 2168 case log := <-logs: 2169 // New log arrived, parse the event and forward to the user 2170 event := new(PoolPaused) 2171 if err := _Pool.contract.UnpackLog(event, "Paused", log); err != nil { 2172 return err 2173 } 2174 event.Raw = log 2175 2176 select { 2177 case sink <- event: 2178 case err := <-sub.Err(): 2179 return err 2180 case <-quit: 2181 return nil 2182 } 2183 case err := <-sub.Err(): 2184 return err 2185 case <-quit: 2186 return nil 2187 } 2188 } 2189 }), nil 2190 } 2191 2192 // ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. 2193 // 2194 // Solidity: event Paused(address account) 2195 func (_Pool *PoolFilterer) ParsePaused(log types.Log) (*PoolPaused, error) { 2196 event := new(PoolPaused) 2197 if err := _Pool.contract.UnpackLog(event, "Paused", log); err != nil { 2198 return nil, err 2199 } 2200 event.Raw = log 2201 return event, nil 2202 } 2203 2204 // PoolPriceDeviationUpdatedIterator is returned from FilterPriceDeviationUpdated and is used to iterate over the raw logs and unpacked data for PriceDeviationUpdated events raised by the Pool contract. 2205 type PoolPriceDeviationUpdatedIterator struct { 2206 Event *PoolPriceDeviationUpdated // Event containing the contract specifics and raw log 2207 2208 contract *bind.BoundContract // Generic contract to use for unpacking event data 2209 event string // Event name to use for unpacking event data 2210 2211 logs chan types.Log // Log channel receiving the found contract events 2212 sub ethereum.Subscription // Subscription for errors, completion and termination 2213 done bool // Whether the subscription completed delivering logs 2214 fail error // Occurred error to stop iteration 2215 } 2216 2217 // Next advances the iterator to the subsequent event, returning whether there 2218 // are any more events found. In case of a retrieval or parsing error, false is 2219 // returned and Error() can be queried for the exact failure. 2220 func (it *PoolPriceDeviationUpdatedIterator) Next() bool { 2221 // If the iterator failed, stop iterating 2222 if it.fail != nil { 2223 return false 2224 } 2225 // If the iterator completed, deliver directly whatever's available 2226 if it.done { 2227 select { 2228 case log := <-it.logs: 2229 it.Event = new(PoolPriceDeviationUpdated) 2230 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2231 it.fail = err 2232 return false 2233 } 2234 it.Event.Raw = log 2235 return true 2236 2237 default: 2238 return false 2239 } 2240 } 2241 // Iterator still in progress, wait for either a data or an error event 2242 select { 2243 case log := <-it.logs: 2244 it.Event = new(PoolPriceDeviationUpdated) 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 case err := <-it.sub.Err(): 2253 it.done = true 2254 it.fail = err 2255 return it.Next() 2256 } 2257 } 2258 2259 // Error returns any retrieval or parsing error occurred during filtering. 2260 func (it *PoolPriceDeviationUpdatedIterator) Error() error { 2261 return it.fail 2262 } 2263 2264 // Close terminates the iteration process, releasing any pending underlying 2265 // resources. 2266 func (it *PoolPriceDeviationUpdatedIterator) Close() error { 2267 it.sub.Unsubscribe() 2268 return nil 2269 } 2270 2271 // PoolPriceDeviationUpdated represents a PriceDeviationUpdated event raised by the Pool contract. 2272 type PoolPriceDeviationUpdated struct { 2273 PreviousPriceDeviation *big.Int 2274 NewPriceDeviation *big.Int 2275 Raw types.Log // Blockchain specific contextual infos 2276 } 2277 2278 // FilterPriceDeviationUpdated is a free log retrieval operation binding the contract event 0x193a6231bcc3d7de036c920f05884fe0d8e1dad662793abd049d33b4d83a45cd. 2279 // 2280 // Solidity: event PriceDeviationUpdated(uint256 previousPriceDeviation, uint256 newPriceDeviation) 2281 func (_Pool *PoolFilterer) FilterPriceDeviationUpdated(opts *bind.FilterOpts) (*PoolPriceDeviationUpdatedIterator, error) { 2282 2283 logs, sub, err := _Pool.contract.FilterLogs(opts, "PriceDeviationUpdated") 2284 if err != nil { 2285 return nil, err 2286 } 2287 return &PoolPriceDeviationUpdatedIterator{contract: _Pool.contract, event: "PriceDeviationUpdated", logs: logs, sub: sub}, nil 2288 } 2289 2290 // WatchPriceDeviationUpdated is a free log subscription operation binding the contract event 0x193a6231bcc3d7de036c920f05884fe0d8e1dad662793abd049d33b4d83a45cd. 2291 // 2292 // Solidity: event PriceDeviationUpdated(uint256 previousPriceDeviation, uint256 newPriceDeviation) 2293 func (_Pool *PoolFilterer) WatchPriceDeviationUpdated(opts *bind.WatchOpts, sink chan<- *PoolPriceDeviationUpdated) (event.Subscription, error) { 2294 2295 logs, sub, err := _Pool.contract.WatchLogs(opts, "PriceDeviationUpdated") 2296 if err != nil { 2297 return nil, err 2298 } 2299 return event.NewSubscription(func(quit <-chan struct{}) error { 2300 defer sub.Unsubscribe() 2301 for { 2302 select { 2303 case log := <-logs: 2304 // New log arrived, parse the event and forward to the user 2305 event := new(PoolPriceDeviationUpdated) 2306 if err := _Pool.contract.UnpackLog(event, "PriceDeviationUpdated", log); err != nil { 2307 return err 2308 } 2309 event.Raw = log 2310 2311 select { 2312 case sink <- event: 2313 case err := <-sub.Err(): 2314 return err 2315 case <-quit: 2316 return nil 2317 } 2318 case err := <-sub.Err(): 2319 return err 2320 case <-quit: 2321 return nil 2322 } 2323 } 2324 }), nil 2325 } 2326 2327 // ParsePriceDeviationUpdated is a log parse operation binding the contract event 0x193a6231bcc3d7de036c920f05884fe0d8e1dad662793abd049d33b4d83a45cd. 2328 // 2329 // Solidity: event PriceDeviationUpdated(uint256 previousPriceDeviation, uint256 newPriceDeviation) 2330 func (_Pool *PoolFilterer) ParsePriceDeviationUpdated(log types.Log) (*PoolPriceDeviationUpdated, error) { 2331 event := new(PoolPriceDeviationUpdated) 2332 if err := _Pool.contract.UnpackLog(event, "PriceDeviationUpdated", log); err != nil { 2333 return nil, err 2334 } 2335 event.Raw = log 2336 return event, nil 2337 } 2338 2339 // PoolRetentionRatioUpdatedIterator is returned from FilterRetentionRatioUpdated and is used to iterate over the raw logs and unpacked data for RetentionRatioUpdated events raised by the Pool contract. 2340 type PoolRetentionRatioUpdatedIterator struct { 2341 Event *PoolRetentionRatioUpdated // Event containing the contract specifics and raw log 2342 2343 contract *bind.BoundContract // Generic contract to use for unpacking event data 2344 event string // Event name to use for unpacking event data 2345 2346 logs chan types.Log // Log channel receiving the found contract events 2347 sub ethereum.Subscription // Subscription for errors, completion and termination 2348 done bool // Whether the subscription completed delivering logs 2349 fail error // Occurred error to stop iteration 2350 } 2351 2352 // Next advances the iterator to the subsequent event, returning whether there 2353 // are any more events found. In case of a retrieval or parsing error, false is 2354 // returned and Error() can be queried for the exact failure. 2355 func (it *PoolRetentionRatioUpdatedIterator) Next() bool { 2356 // If the iterator failed, stop iterating 2357 if it.fail != nil { 2358 return false 2359 } 2360 // If the iterator completed, deliver directly whatever's available 2361 if it.done { 2362 select { 2363 case log := <-it.logs: 2364 it.Event = new(PoolRetentionRatioUpdated) 2365 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2366 it.fail = err 2367 return false 2368 } 2369 it.Event.Raw = log 2370 return true 2371 2372 default: 2373 return false 2374 } 2375 } 2376 // Iterator still in progress, wait for either a data or an error event 2377 select { 2378 case log := <-it.logs: 2379 it.Event = new(PoolRetentionRatioUpdated) 2380 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2381 it.fail = err 2382 return false 2383 } 2384 it.Event.Raw = log 2385 return true 2386 2387 case err := <-it.sub.Err(): 2388 it.done = true 2389 it.fail = err 2390 return it.Next() 2391 } 2392 } 2393 2394 // Error returns any retrieval or parsing error occurred during filtering. 2395 func (it *PoolRetentionRatioUpdatedIterator) Error() error { 2396 return it.fail 2397 } 2398 2399 // Close terminates the iteration process, releasing any pending underlying 2400 // resources. 2401 func (it *PoolRetentionRatioUpdatedIterator) Close() error { 2402 it.sub.Unsubscribe() 2403 return nil 2404 } 2405 2406 // PoolRetentionRatioUpdated represents a RetentionRatioUpdated event raised by the Pool contract. 2407 type PoolRetentionRatioUpdated struct { 2408 PreviousRetentionRatio *big.Int 2409 NewRetentionRatio *big.Int 2410 Raw types.Log // Blockchain specific contextual infos 2411 } 2412 2413 // FilterRetentionRatioUpdated is a free log retrieval operation binding the contract event 0xbc341359e3658046c114365fc4bf0a6bfe11e53d72faf8ac4fe19b53aec6b3f9. 2414 // 2415 // Solidity: event RetentionRatioUpdated(uint256 previousRetentionRatio, uint256 newRetentionRatio) 2416 func (_Pool *PoolFilterer) FilterRetentionRatioUpdated(opts *bind.FilterOpts) (*PoolRetentionRatioUpdatedIterator, error) { 2417 2418 logs, sub, err := _Pool.contract.FilterLogs(opts, "RetentionRatioUpdated") 2419 if err != nil { 2420 return nil, err 2421 } 2422 return &PoolRetentionRatioUpdatedIterator{contract: _Pool.contract, event: "RetentionRatioUpdated", logs: logs, sub: sub}, nil 2423 } 2424 2425 // WatchRetentionRatioUpdated is a free log subscription operation binding the contract event 0xbc341359e3658046c114365fc4bf0a6bfe11e53d72faf8ac4fe19b53aec6b3f9. 2426 // 2427 // Solidity: event RetentionRatioUpdated(uint256 previousRetentionRatio, uint256 newRetentionRatio) 2428 func (_Pool *PoolFilterer) WatchRetentionRatioUpdated(opts *bind.WatchOpts, sink chan<- *PoolRetentionRatioUpdated) (event.Subscription, error) { 2429 2430 logs, sub, err := _Pool.contract.WatchLogs(opts, "RetentionRatioUpdated") 2431 if err != nil { 2432 return nil, err 2433 } 2434 return event.NewSubscription(func(quit <-chan struct{}) error { 2435 defer sub.Unsubscribe() 2436 for { 2437 select { 2438 case log := <-logs: 2439 // New log arrived, parse the event and forward to the user 2440 event := new(PoolRetentionRatioUpdated) 2441 if err := _Pool.contract.UnpackLog(event, "RetentionRatioUpdated", log); err != nil { 2442 return err 2443 } 2444 event.Raw = log 2445 2446 select { 2447 case sink <- event: 2448 case err := <-sub.Err(): 2449 return err 2450 case <-quit: 2451 return nil 2452 } 2453 case err := <-sub.Err(): 2454 return err 2455 case <-quit: 2456 return nil 2457 } 2458 } 2459 }), nil 2460 } 2461 2462 // ParseRetentionRatioUpdated is a log parse operation binding the contract event 0xbc341359e3658046c114365fc4bf0a6bfe11e53d72faf8ac4fe19b53aec6b3f9. 2463 // 2464 // Solidity: event RetentionRatioUpdated(uint256 previousRetentionRatio, uint256 newRetentionRatio) 2465 func (_Pool *PoolFilterer) ParseRetentionRatioUpdated(log types.Log) (*PoolRetentionRatioUpdated, error) { 2466 event := new(PoolRetentionRatioUpdated) 2467 if err := _Pool.contract.UnpackLog(event, "RetentionRatioUpdated", log); err != nil { 2468 return nil, err 2469 } 2470 event.Raw = log 2471 return event, nil 2472 } 2473 2474 // PoolSlippageParamsUpdatedIterator is returned from FilterSlippageParamsUpdated and is used to iterate over the raw logs and unpacked data for SlippageParamsUpdated events raised by the Pool contract. 2475 type PoolSlippageParamsUpdatedIterator struct { 2476 Event *PoolSlippageParamsUpdated // Event containing the contract specifics and raw log 2477 2478 contract *bind.BoundContract // Generic contract to use for unpacking event data 2479 event string // Event name to use for unpacking event data 2480 2481 logs chan types.Log // Log channel receiving the found contract events 2482 sub ethereum.Subscription // Subscription for errors, completion and termination 2483 done bool // Whether the subscription completed delivering logs 2484 fail error // Occurred error to stop iteration 2485 } 2486 2487 // Next advances the iterator to the subsequent event, returning whether there 2488 // are any more events found. In case of a retrieval or parsing error, false is 2489 // returned and Error() can be queried for the exact failure. 2490 func (it *PoolSlippageParamsUpdatedIterator) Next() bool { 2491 // If the iterator failed, stop iterating 2492 if it.fail != nil { 2493 return false 2494 } 2495 // If the iterator completed, deliver directly whatever's available 2496 if it.done { 2497 select { 2498 case log := <-it.logs: 2499 it.Event = new(PoolSlippageParamsUpdated) 2500 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2501 it.fail = err 2502 return false 2503 } 2504 it.Event.Raw = log 2505 return true 2506 2507 default: 2508 return false 2509 } 2510 } 2511 // Iterator still in progress, wait for either a data or an error event 2512 select { 2513 case log := <-it.logs: 2514 it.Event = new(PoolSlippageParamsUpdated) 2515 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2516 it.fail = err 2517 return false 2518 } 2519 it.Event.Raw = log 2520 return true 2521 2522 case err := <-it.sub.Err(): 2523 it.done = true 2524 it.fail = err 2525 return it.Next() 2526 } 2527 } 2528 2529 // Error returns any retrieval or parsing error occurred during filtering. 2530 func (it *PoolSlippageParamsUpdatedIterator) Error() error { 2531 return it.fail 2532 } 2533 2534 // Close terminates the iteration process, releasing any pending underlying 2535 // resources. 2536 func (it *PoolSlippageParamsUpdatedIterator) Close() error { 2537 it.sub.Unsubscribe() 2538 return nil 2539 } 2540 2541 // PoolSlippageParamsUpdated represents a SlippageParamsUpdated event raised by the Pool contract. 2542 type PoolSlippageParamsUpdated struct { 2543 PreviousK *big.Int 2544 NewK *big.Int 2545 PreviousN *big.Int 2546 NewN *big.Int 2547 PreviousC1 *big.Int 2548 NewC1 *big.Int 2549 PreviousXThreshold *big.Int 2550 NewXThreshold *big.Int 2551 Raw types.Log // Blockchain specific contextual infos 2552 } 2553 2554 // FilterSlippageParamsUpdated is a free log retrieval operation binding the contract event 0x4f79edc127ae2274ce8320073956fad0b9e727d4ed275b2d3665a75edaffb7a3. 2555 // 2556 // Solidity: event SlippageParamsUpdated(uint256 previousK, uint256 newK, uint256 previousN, uint256 newN, uint256 previousC1, uint256 newC1, uint256 previousXThreshold, uint256 newXThreshold) 2557 func (_Pool *PoolFilterer) FilterSlippageParamsUpdated(opts *bind.FilterOpts) (*PoolSlippageParamsUpdatedIterator, error) { 2558 2559 logs, sub, err := _Pool.contract.FilterLogs(opts, "SlippageParamsUpdated") 2560 if err != nil { 2561 return nil, err 2562 } 2563 return &PoolSlippageParamsUpdatedIterator{contract: _Pool.contract, event: "SlippageParamsUpdated", logs: logs, sub: sub}, nil 2564 } 2565 2566 // WatchSlippageParamsUpdated is a free log subscription operation binding the contract event 0x4f79edc127ae2274ce8320073956fad0b9e727d4ed275b2d3665a75edaffb7a3. 2567 // 2568 // Solidity: event SlippageParamsUpdated(uint256 previousK, uint256 newK, uint256 previousN, uint256 newN, uint256 previousC1, uint256 newC1, uint256 previousXThreshold, uint256 newXThreshold) 2569 func (_Pool *PoolFilterer) WatchSlippageParamsUpdated(opts *bind.WatchOpts, sink chan<- *PoolSlippageParamsUpdated) (event.Subscription, error) { 2570 2571 logs, sub, err := _Pool.contract.WatchLogs(opts, "SlippageParamsUpdated") 2572 if err != nil { 2573 return nil, err 2574 } 2575 return event.NewSubscription(func(quit <-chan struct{}) error { 2576 defer sub.Unsubscribe() 2577 for { 2578 select { 2579 case log := <-logs: 2580 // New log arrived, parse the event and forward to the user 2581 event := new(PoolSlippageParamsUpdated) 2582 if err := _Pool.contract.UnpackLog(event, "SlippageParamsUpdated", log); err != nil { 2583 return err 2584 } 2585 event.Raw = log 2586 2587 select { 2588 case sink <- event: 2589 case err := <-sub.Err(): 2590 return err 2591 case <-quit: 2592 return nil 2593 } 2594 case err := <-sub.Err(): 2595 return err 2596 case <-quit: 2597 return nil 2598 } 2599 } 2600 }), nil 2601 } 2602 2603 // ParseSlippageParamsUpdated is a log parse operation binding the contract event 0x4f79edc127ae2274ce8320073956fad0b9e727d4ed275b2d3665a75edaffb7a3. 2604 // 2605 // Solidity: event SlippageParamsUpdated(uint256 previousK, uint256 newK, uint256 previousN, uint256 newN, uint256 previousC1, uint256 newC1, uint256 previousXThreshold, uint256 newXThreshold) 2606 func (_Pool *PoolFilterer) ParseSlippageParamsUpdated(log types.Log) (*PoolSlippageParamsUpdated, error) { 2607 event := new(PoolSlippageParamsUpdated) 2608 if err := _Pool.contract.UnpackLog(event, "SlippageParamsUpdated", log); err != nil { 2609 return nil, err 2610 } 2611 event.Raw = log 2612 return event, nil 2613 } 2614 2615 // PoolSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the Pool contract. 2616 type PoolSwapIterator struct { 2617 Event *PoolSwap // Event containing the contract specifics and raw log 2618 2619 contract *bind.BoundContract // Generic contract to use for unpacking event data 2620 event string // Event name to use for unpacking event data 2621 2622 logs chan types.Log // Log channel receiving the found contract events 2623 sub ethereum.Subscription // Subscription for errors, completion and termination 2624 done bool // Whether the subscription completed delivering logs 2625 fail error // Occurred error to stop iteration 2626 } 2627 2628 // Next advances the iterator to the subsequent event, returning whether there 2629 // are any more events found. In case of a retrieval or parsing error, false is 2630 // returned and Error() can be queried for the exact failure. 2631 func (it *PoolSwapIterator) Next() bool { 2632 // If the iterator failed, stop iterating 2633 if it.fail != nil { 2634 return false 2635 } 2636 // If the iterator completed, deliver directly whatever's available 2637 if it.done { 2638 select { 2639 case log := <-it.logs: 2640 it.Event = new(PoolSwap) 2641 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2642 it.fail = err 2643 return false 2644 } 2645 it.Event.Raw = log 2646 return true 2647 2648 default: 2649 return false 2650 } 2651 } 2652 // Iterator still in progress, wait for either a data or an error event 2653 select { 2654 case log := <-it.logs: 2655 it.Event = new(PoolSwap) 2656 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2657 it.fail = err 2658 return false 2659 } 2660 it.Event.Raw = log 2661 return true 2662 2663 case err := <-it.sub.Err(): 2664 it.done = true 2665 it.fail = err 2666 return it.Next() 2667 } 2668 } 2669 2670 // Error returns any retrieval or parsing error occurred during filtering. 2671 func (it *PoolSwapIterator) Error() error { 2672 return it.fail 2673 } 2674 2675 // Close terminates the iteration process, releasing any pending underlying 2676 // resources. 2677 func (it *PoolSwapIterator) Close() error { 2678 it.sub.Unsubscribe() 2679 return nil 2680 } 2681 2682 // PoolSwap represents a Swap event raised by the Pool contract. 2683 type PoolSwap struct { 2684 Sender common.Address 2685 FromToken common.Address 2686 ToToken common.Address 2687 FromAmount *big.Int 2688 ToAmount *big.Int 2689 To common.Address 2690 Raw types.Log // Blockchain specific contextual infos 2691 } 2692 2693 // FilterSwap is a free log retrieval operation binding the contract event 0x54787c404bb33c88e86f4baf88183a3b0141d0a848e6a9f7a13b66ae3a9b73d1. 2694 // 2695 // Solidity: event Swap(address indexed sender, address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address indexed to) 2696 func (_Pool *PoolFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*PoolSwapIterator, error) { 2697 2698 var senderRule []interface{} 2699 for _, senderItem := range sender { 2700 senderRule = append(senderRule, senderItem) 2701 } 2702 2703 var toRule []interface{} 2704 for _, toItem := range to { 2705 toRule = append(toRule, toItem) 2706 } 2707 2708 logs, sub, err := _Pool.contract.FilterLogs(opts, "Swap", senderRule, toRule) 2709 if err != nil { 2710 return nil, err 2711 } 2712 return &PoolSwapIterator{contract: _Pool.contract, event: "Swap", logs: logs, sub: sub}, nil 2713 } 2714 2715 // WatchSwap is a free log subscription operation binding the contract event 0x54787c404bb33c88e86f4baf88183a3b0141d0a848e6a9f7a13b66ae3a9b73d1. 2716 // 2717 // Solidity: event Swap(address indexed sender, address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address indexed to) 2718 func (_Pool *PoolFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *PoolSwap, sender []common.Address, to []common.Address) (event.Subscription, error) { 2719 2720 var senderRule []interface{} 2721 for _, senderItem := range sender { 2722 senderRule = append(senderRule, senderItem) 2723 } 2724 2725 var toRule []interface{} 2726 for _, toItem := range to { 2727 toRule = append(toRule, toItem) 2728 } 2729 2730 logs, sub, err := _Pool.contract.WatchLogs(opts, "Swap", senderRule, toRule) 2731 if err != nil { 2732 return nil, err 2733 } 2734 return event.NewSubscription(func(quit <-chan struct{}) error { 2735 defer sub.Unsubscribe() 2736 for { 2737 select { 2738 case log := <-logs: 2739 // New log arrived, parse the event and forward to the user 2740 event := new(PoolSwap) 2741 if err := _Pool.contract.UnpackLog(event, "Swap", log); err != nil { 2742 return err 2743 } 2744 event.Raw = log 2745 2746 select { 2747 case sink <- event: 2748 case err := <-sub.Err(): 2749 return err 2750 case <-quit: 2751 return nil 2752 } 2753 case err := <-sub.Err(): 2754 return err 2755 case <-quit: 2756 return nil 2757 } 2758 } 2759 }), nil 2760 } 2761 2762 // ParseSwap is a log parse operation binding the contract event 0x54787c404bb33c88e86f4baf88183a3b0141d0a848e6a9f7a13b66ae3a9b73d1. 2763 // 2764 // Solidity: event Swap(address indexed sender, address fromToken, address toToken, uint256 fromAmount, uint256 toAmount, address indexed to) 2765 func (_Pool *PoolFilterer) ParseSwap(log types.Log) (*PoolSwap, error) { 2766 event := new(PoolSwap) 2767 if err := _Pool.contract.UnpackLog(event, "Swap", log); err != nil { 2768 return nil, err 2769 } 2770 event.Raw = log 2771 return event, nil 2772 } 2773 2774 // PoolUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Pool contract. 2775 type PoolUnpausedIterator struct { 2776 Event *PoolUnpaused // Event containing the contract specifics and raw log 2777 2778 contract *bind.BoundContract // Generic contract to use for unpacking event data 2779 event string // Event name to use for unpacking event data 2780 2781 logs chan types.Log // Log channel receiving the found contract events 2782 sub ethereum.Subscription // Subscription for errors, completion and termination 2783 done bool // Whether the subscription completed delivering logs 2784 fail error // Occurred error to stop iteration 2785 } 2786 2787 // Next advances the iterator to the subsequent event, returning whether there 2788 // are any more events found. In case of a retrieval or parsing error, false is 2789 // returned and Error() can be queried for the exact failure. 2790 func (it *PoolUnpausedIterator) Next() bool { 2791 // If the iterator failed, stop iterating 2792 if it.fail != nil { 2793 return false 2794 } 2795 // If the iterator completed, deliver directly whatever's available 2796 if it.done { 2797 select { 2798 case log := <-it.logs: 2799 it.Event = new(PoolUnpaused) 2800 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2801 it.fail = err 2802 return false 2803 } 2804 it.Event.Raw = log 2805 return true 2806 2807 default: 2808 return false 2809 } 2810 } 2811 // Iterator still in progress, wait for either a data or an error event 2812 select { 2813 case log := <-it.logs: 2814 it.Event = new(PoolUnpaused) 2815 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2816 it.fail = err 2817 return false 2818 } 2819 it.Event.Raw = log 2820 return true 2821 2822 case err := <-it.sub.Err(): 2823 it.done = true 2824 it.fail = err 2825 return it.Next() 2826 } 2827 } 2828 2829 // Error returns any retrieval or parsing error occurred during filtering. 2830 func (it *PoolUnpausedIterator) Error() error { 2831 return it.fail 2832 } 2833 2834 // Close terminates the iteration process, releasing any pending underlying 2835 // resources. 2836 func (it *PoolUnpausedIterator) Close() error { 2837 it.sub.Unsubscribe() 2838 return nil 2839 } 2840 2841 // PoolUnpaused represents a Unpaused event raised by the Pool contract. 2842 type PoolUnpaused struct { 2843 Account common.Address 2844 Raw types.Log // Blockchain specific contextual infos 2845 } 2846 2847 // FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. 2848 // 2849 // Solidity: event Unpaused(address account) 2850 func (_Pool *PoolFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PoolUnpausedIterator, error) { 2851 2852 logs, sub, err := _Pool.contract.FilterLogs(opts, "Unpaused") 2853 if err != nil { 2854 return nil, err 2855 } 2856 return &PoolUnpausedIterator{contract: _Pool.contract, event: "Unpaused", logs: logs, sub: sub}, nil 2857 } 2858 2859 // WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. 2860 // 2861 // Solidity: event Unpaused(address account) 2862 func (_Pool *PoolFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PoolUnpaused) (event.Subscription, error) { 2863 2864 logs, sub, err := _Pool.contract.WatchLogs(opts, "Unpaused") 2865 if err != nil { 2866 return nil, err 2867 } 2868 return event.NewSubscription(func(quit <-chan struct{}) error { 2869 defer sub.Unsubscribe() 2870 for { 2871 select { 2872 case log := <-logs: 2873 // New log arrived, parse the event and forward to the user 2874 event := new(PoolUnpaused) 2875 if err := _Pool.contract.UnpackLog(event, "Unpaused", log); err != nil { 2876 return err 2877 } 2878 event.Raw = log 2879 2880 select { 2881 case sink <- event: 2882 case err := <-sub.Err(): 2883 return err 2884 case <-quit: 2885 return nil 2886 } 2887 case err := <-sub.Err(): 2888 return err 2889 case <-quit: 2890 return nil 2891 } 2892 } 2893 }), nil 2894 } 2895 2896 // ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. 2897 // 2898 // Solidity: event Unpaused(address account) 2899 func (_Pool *PoolFilterer) ParseUnpaused(log types.Log) (*PoolUnpaused, error) { 2900 event := new(PoolUnpaused) 2901 if err := _Pool.contract.UnpackLog(event, "Unpaused", log); err != nil { 2902 return nil, err 2903 } 2904 event.Raw = log 2905 return event, nil 2906 } 2907 2908 // PoolWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the Pool contract. 2909 type PoolWithdrawIterator struct { 2910 Event *PoolWithdraw // Event containing the contract specifics and raw log 2911 2912 contract *bind.BoundContract // Generic contract to use for unpacking event data 2913 event string // Event name to use for unpacking event data 2914 2915 logs chan types.Log // Log channel receiving the found contract events 2916 sub ethereum.Subscription // Subscription for errors, completion and termination 2917 done bool // Whether the subscription completed delivering logs 2918 fail error // Occurred error to stop iteration 2919 } 2920 2921 // Next advances the iterator to the subsequent event, returning whether there 2922 // are any more events found. In case of a retrieval or parsing error, false is 2923 // returned and Error() can be queried for the exact failure. 2924 func (it *PoolWithdrawIterator) Next() bool { 2925 // If the iterator failed, stop iterating 2926 if it.fail != nil { 2927 return false 2928 } 2929 // If the iterator completed, deliver directly whatever's available 2930 if it.done { 2931 select { 2932 case log := <-it.logs: 2933 it.Event = new(PoolWithdraw) 2934 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2935 it.fail = err 2936 return false 2937 } 2938 it.Event.Raw = log 2939 return true 2940 2941 default: 2942 return false 2943 } 2944 } 2945 // Iterator still in progress, wait for either a data or an error event 2946 select { 2947 case log := <-it.logs: 2948 it.Event = new(PoolWithdraw) 2949 if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { 2950 it.fail = err 2951 return false 2952 } 2953 it.Event.Raw = log 2954 return true 2955 2956 case err := <-it.sub.Err(): 2957 it.done = true 2958 it.fail = err 2959 return it.Next() 2960 } 2961 } 2962 2963 // Error returns any retrieval or parsing error occurred during filtering. 2964 func (it *PoolWithdrawIterator) Error() error { 2965 return it.fail 2966 } 2967 2968 // Close terminates the iteration process, releasing any pending underlying 2969 // resources. 2970 func (it *PoolWithdrawIterator) Close() error { 2971 it.sub.Unsubscribe() 2972 return nil 2973 } 2974 2975 // PoolWithdraw represents a Withdraw event raised by the Pool contract. 2976 type PoolWithdraw struct { 2977 Sender common.Address 2978 Token common.Address 2979 Amount *big.Int 2980 Liquidity *big.Int 2981 To common.Address 2982 Raw types.Log // Blockchain specific contextual infos 2983 } 2984 2985 // FilterWithdraw is a free log retrieval operation binding the contract event 0xfb80d861da582b723be2d19507ce3e03851820c464abea89156ec77e089b1ad9. 2986 // 2987 // Solidity: event Withdraw(address indexed sender, address token, uint256 amount, uint256 liquidity, address indexed to) 2988 func (_Pool *PoolFilterer) FilterWithdraw(opts *bind.FilterOpts, sender []common.Address, to []common.Address) (*PoolWithdrawIterator, error) { 2989 2990 var senderRule []interface{} 2991 for _, senderItem := range sender { 2992 senderRule = append(senderRule, senderItem) 2993 } 2994 2995 var toRule []interface{} 2996 for _, toItem := range to { 2997 toRule = append(toRule, toItem) 2998 } 2999 3000 logs, sub, err := _Pool.contract.FilterLogs(opts, "Withdraw", senderRule, toRule) 3001 if err != nil { 3002 return nil, err 3003 } 3004 return &PoolWithdrawIterator{contract: _Pool.contract, event: "Withdraw", logs: logs, sub: sub}, nil 3005 } 3006 3007 // WatchWithdraw is a free log subscription operation binding the contract event 0xfb80d861da582b723be2d19507ce3e03851820c464abea89156ec77e089b1ad9. 3008 // 3009 // Solidity: event Withdraw(address indexed sender, address token, uint256 amount, uint256 liquidity, address indexed to) 3010 func (_Pool *PoolFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *PoolWithdraw, sender []common.Address, to []common.Address) (event.Subscription, error) { 3011 3012 var senderRule []interface{} 3013 for _, senderItem := range sender { 3014 senderRule = append(senderRule, senderItem) 3015 } 3016 3017 var toRule []interface{} 3018 for _, toItem := range to { 3019 toRule = append(toRule, toItem) 3020 } 3021 3022 logs, sub, err := _Pool.contract.WatchLogs(opts, "Withdraw", senderRule, toRule) 3023 if err != nil { 3024 return nil, err 3025 } 3026 return event.NewSubscription(func(quit <-chan struct{}) error { 3027 defer sub.Unsubscribe() 3028 for { 3029 select { 3030 case log := <-logs: 3031 // New log arrived, parse the event and forward to the user 3032 event := new(PoolWithdraw) 3033 if err := _Pool.contract.UnpackLog(event, "Withdraw", log); err != nil { 3034 return err 3035 } 3036 event.Raw = log 3037 3038 select { 3039 case sink <- event: 3040 case err := <-sub.Err(): 3041 return err 3042 case <-quit: 3043 return nil 3044 } 3045 case err := <-sub.Err(): 3046 return err 3047 case <-quit: 3048 return nil 3049 } 3050 } 3051 }), nil 3052 } 3053 3054 // ParseWithdraw is a log parse operation binding the contract event 0xfb80d861da582b723be2d19507ce3e03851820c464abea89156ec77e089b1ad9. 3055 // 3056 // Solidity: event Withdraw(address indexed sender, address token, uint256 amount, uint256 liquidity, address indexed to) 3057 func (_Pool *PoolFilterer) ParseWithdraw(log types.Log) (*PoolWithdraw, error) { 3058 event := new(PoolWithdraw) 3059 if err := _Pool.contract.UnpackLog(event, "Withdraw", log); err != nil { 3060 return nil, err 3061 } 3062 event.Raw = log 3063 return event, nil 3064 }