github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/exchange-scrapers/maverick/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  	_ = abi.ConvertType
    30  )
    31  
    32  // IPoolAddLiquidityParams is an auto generated low-level Go binding around an user-defined struct.
    33  type IPoolAddLiquidityParams struct {
    34  	Kind    uint8
    35  	Pos     int32
    36  	IsDelta bool
    37  	DeltaA  *big.Int
    38  	DeltaB  *big.Int
    39  }
    40  
    41  // IPoolBinDelta is an auto generated low-level Go binding around an user-defined struct.
    42  type IPoolBinDelta struct {
    43  	DeltaA         *big.Int
    44  	DeltaB         *big.Int
    45  	DeltaLpBalance *big.Int
    46  	BinId          *big.Int
    47  	Kind           uint8
    48  	LowerTick      int32
    49  	IsActive       bool
    50  }
    51  
    52  // IPoolBinState is an auto generated low-level Go binding around an user-defined struct.
    53  type IPoolBinState struct {
    54  	ReserveA        *big.Int
    55  	ReserveB        *big.Int
    56  	MergeBinBalance *big.Int
    57  	MergeId         *big.Int
    58  	TotalSupply     *big.Int
    59  	Kind            uint8
    60  	LowerTick       int32
    61  }
    62  
    63  // IPoolRemoveLiquidityParams is an auto generated low-level Go binding around an user-defined struct.
    64  type IPoolRemoveLiquidityParams struct {
    65  	BinId  *big.Int
    66  	Amount *big.Int
    67  }
    68  
    69  // IPoolState is an auto generated low-level Go binding around an user-defined struct.
    70  type IPoolState struct {
    71  	ActiveTick       int32
    72  	Status           uint8
    73  	BinCounter       *big.Int
    74  	ProtocolFeeRatio uint64
    75  }
    76  
    77  // IPoolTwaState is an auto generated low-level Go binding around an user-defined struct.
    78  type IPoolTwaState struct {
    79  	Twa           *big.Int
    80  	Value         *big.Int
    81  	LastTimestamp uint64
    82  }
    83  
    84  // PoolMetaData contains all meta data concerning the Pool contract.
    85  var PoolMetaData = &bind.MetaData{
    86  	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"name\":\"AddLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"reserveA\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"reserveB\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"mergeId\",\"type\":\"uint128\"}],\"name\":\"BinMerged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"int128\",\"name\":\"previousTick\",\"type\":\"int128\"},{\"indexed\":false,\"internalType\":\"int128\",\"name\":\"newTick\",\"type\":\"int128\"}],\"name\":\"BinMoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxRecursion\",\"type\":\"uint32\"}],\"name\":\"MigrateBinsUpStack\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTokenA\",\"type\":\"bool\"}],\"name\":\"ProtocolFeeCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"name\":\"RemoveLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"}],\"name\":\"SetProtocolFeeRatio\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tokenAIn\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"exactOutput\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int32\",\"name\":\"activeTick\",\"type\":\"int32\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"toTokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structIPool.RemoveLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"name\":\"TransferLiquidity\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"pos\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isDelta\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"}],\"internalType\":\"structIPool.AddLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenBAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpToken\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"binBalanceA\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"binBalanceB\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"tick\",\"type\":\"int32\"}],\"name\":\"binMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"tick\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"kind\",\"type\":\"uint256\"}],\"name\":\"binPositions\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contractIFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"}],\"name\":\"getBin\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"reserveA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"reserveB\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"mergeBinBalance\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"mergeId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"totalSupply\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"}],\"internalType\":\"structIPool.BinState\",\"name\":\"bin\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentTwa\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"int32\",\"name\":\"activeTick\",\"type\":\"int32\"},{\"internalType\":\"uint8\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"binCounter\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"protocolFeeRatio\",\"type\":\"uint64\"}],\"internalType\":\"structIPool.State\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTwa\",\"outputs\":[{\"components\":[{\"internalType\":\"int96\",\"name\":\"twa\",\"type\":\"int96\"},{\"internalType\":\"int96\",\"name\":\"value\",\"type\":\"int96\"},{\"internalType\":\"uint64\",\"name\":\"lastTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structIPool.TwaState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"maxRecursion\",\"type\":\"uint32\"}],\"name\":\"migrateBinUpStack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"structIPool.RemoveLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenBOut\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tokenAIn\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"exactOutput\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"sqrtPriceLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tickSpacing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenA\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenAScale\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenB\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenBScale\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"fromTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"toTokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"structIPool.RemoveLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"name\":\"transferLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
    87  }
    88  
    89  // PoolABI is the input ABI used to generate the binding from.
    90  // Deprecated: Use PoolMetaData.ABI instead.
    91  var PoolABI = PoolMetaData.ABI
    92  
    93  // Pool is an auto generated Go binding around an Ethereum contract.
    94  type Pool struct {
    95  	PoolCaller     // Read-only binding to the contract
    96  	PoolTransactor // Write-only binding to the contract
    97  	PoolFilterer   // Log filterer for contract events
    98  }
    99  
   100  // PoolCaller is an auto generated read-only Go binding around an Ethereum contract.
   101  type PoolCaller struct {
   102  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   103  }
   104  
   105  // PoolTransactor is an auto generated write-only Go binding around an Ethereum contract.
   106  type PoolTransactor struct {
   107  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   108  }
   109  
   110  // PoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
   111  type PoolFilterer struct {
   112  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
   113  }
   114  
   115  // PoolSession is an auto generated Go binding around an Ethereum contract,
   116  // with pre-set call and transact options.
   117  type PoolSession struct {
   118  	Contract     *Pool             // Generic contract binding to set the session for
   119  	CallOpts     bind.CallOpts     // Call options to use throughout this session
   120  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   121  }
   122  
   123  // PoolCallerSession is an auto generated read-only Go binding around an Ethereum contract,
   124  // with pre-set call options.
   125  type PoolCallerSession struct {
   126  	Contract *PoolCaller   // Generic contract caller binding to set the session for
   127  	CallOpts bind.CallOpts // Call options to use throughout this session
   128  }
   129  
   130  // PoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   131  // with pre-set transact options.
   132  type PoolTransactorSession struct {
   133  	Contract     *PoolTransactor   // Generic contract transactor binding to set the session for
   134  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   135  }
   136  
   137  // PoolRaw is an auto generated low-level Go binding around an Ethereum contract.
   138  type PoolRaw struct {
   139  	Contract *Pool // Generic contract binding to access the raw methods on
   140  }
   141  
   142  // PoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   143  type PoolCallerRaw struct {
   144  	Contract *PoolCaller // Generic read-only contract binding to access the raw methods on
   145  }
   146  
   147  // PoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   148  type PoolTransactorRaw struct {
   149  	Contract *PoolTransactor // Generic write-only contract binding to access the raw methods on
   150  }
   151  
   152  // NewPool creates a new instance of Pool, bound to a specific deployed contract.
   153  func NewPool(address common.Address, backend bind.ContractBackend) (*Pool, error) {
   154  	contract, err := bindPool(address, backend, backend, backend)
   155  	if err != nil {
   156  		return nil, err
   157  	}
   158  	return &Pool{PoolCaller: PoolCaller{contract: contract}, PoolTransactor: PoolTransactor{contract: contract}, PoolFilterer: PoolFilterer{contract: contract}}, nil
   159  }
   160  
   161  // NewPoolCaller creates a new read-only instance of Pool, bound to a specific deployed contract.
   162  func NewPoolCaller(address common.Address, caller bind.ContractCaller) (*PoolCaller, error) {
   163  	contract, err := bindPool(address, caller, nil, nil)
   164  	if err != nil {
   165  		return nil, err
   166  	}
   167  	return &PoolCaller{contract: contract}, nil
   168  }
   169  
   170  // NewPoolTransactor creates a new write-only instance of Pool, bound to a specific deployed contract.
   171  func NewPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*PoolTransactor, error) {
   172  	contract, err := bindPool(address, nil, transactor, nil)
   173  	if err != nil {
   174  		return nil, err
   175  	}
   176  	return &PoolTransactor{contract: contract}, nil
   177  }
   178  
   179  // NewPoolFilterer creates a new log filterer instance of Pool, bound to a specific deployed contract.
   180  func NewPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*PoolFilterer, error) {
   181  	contract, err := bindPool(address, nil, nil, filterer)
   182  	if err != nil {
   183  		return nil, err
   184  	}
   185  	return &PoolFilterer{contract: contract}, nil
   186  }
   187  
   188  // bindPool binds a generic wrapper to an already deployed contract.
   189  func bindPool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   190  	parsed, err := PoolMetaData.GetAbi()
   191  	if err != nil {
   192  		return nil, err
   193  	}
   194  	return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
   195  }
   196  
   197  // Call invokes the (constant) contract method with params as input values and
   198  // sets the output to result. The result type might be a single field for simple
   199  // returns, a slice of interfaces for anonymous returns and a struct for named
   200  // returns.
   201  func (_Pool *PoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   202  	return _Pool.Contract.PoolCaller.contract.Call(opts, result, method, params...)
   203  }
   204  
   205  // Transfer initiates a plain transaction to move funds to the contract, calling
   206  // its default method if one is available.
   207  func (_Pool *PoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   208  	return _Pool.Contract.PoolTransactor.contract.Transfer(opts)
   209  }
   210  
   211  // Transact invokes the (paid) contract method with params as input values.
   212  func (_Pool *PoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   213  	return _Pool.Contract.PoolTransactor.contract.Transact(opts, method, params...)
   214  }
   215  
   216  // Call invokes the (constant) contract method with params as input values and
   217  // sets the output to result. The result type might be a single field for simple
   218  // returns, a slice of interfaces for anonymous returns and a struct for named
   219  // returns.
   220  func (_Pool *PoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   221  	return _Pool.Contract.contract.Call(opts, result, method, params...)
   222  }
   223  
   224  // Transfer initiates a plain transaction to move funds to the contract, calling
   225  // its default method if one is available.
   226  func (_Pool *PoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   227  	return _Pool.Contract.contract.Transfer(opts)
   228  }
   229  
   230  // Transact invokes the (paid) contract method with params as input values.
   231  func (_Pool *PoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   232  	return _Pool.Contract.contract.Transact(opts, method, params...)
   233  }
   234  
   235  // BalanceOf is a free data retrieval call binding the contract method 0x6da3bf8b.
   236  //
   237  // Solidity: function balanceOf(uint256 tokenId, uint128 binId) view returns(uint256 lpToken)
   238  func (_Pool *PoolCaller) BalanceOf(opts *bind.CallOpts, tokenId *big.Int, binId *big.Int) (*big.Int, error) {
   239  	var out []interface{}
   240  	err := _Pool.contract.Call(opts, &out, "balanceOf", tokenId, binId)
   241  
   242  	if err != nil {
   243  		return *new(*big.Int), err
   244  	}
   245  
   246  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   247  
   248  	return out0, err
   249  
   250  }
   251  
   252  // BalanceOf is a free data retrieval call binding the contract method 0x6da3bf8b.
   253  //
   254  // Solidity: function balanceOf(uint256 tokenId, uint128 binId) view returns(uint256 lpToken)
   255  func (_Pool *PoolSession) BalanceOf(tokenId *big.Int, binId *big.Int) (*big.Int, error) {
   256  	return _Pool.Contract.BalanceOf(&_Pool.CallOpts, tokenId, binId)
   257  }
   258  
   259  // BalanceOf is a free data retrieval call binding the contract method 0x6da3bf8b.
   260  //
   261  // Solidity: function balanceOf(uint256 tokenId, uint128 binId) view returns(uint256 lpToken)
   262  func (_Pool *PoolCallerSession) BalanceOf(tokenId *big.Int, binId *big.Int) (*big.Int, error) {
   263  	return _Pool.Contract.BalanceOf(&_Pool.CallOpts, tokenId, binId)
   264  }
   265  
   266  // BinBalanceA is a free data retrieval call binding the contract method 0x75bbbd73.
   267  //
   268  // Solidity: function binBalanceA() view returns(uint128)
   269  func (_Pool *PoolCaller) BinBalanceA(opts *bind.CallOpts) (*big.Int, error) {
   270  	var out []interface{}
   271  	err := _Pool.contract.Call(opts, &out, "binBalanceA")
   272  
   273  	if err != nil {
   274  		return *new(*big.Int), err
   275  	}
   276  
   277  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   278  
   279  	return out0, err
   280  
   281  }
   282  
   283  // BinBalanceA is a free data retrieval call binding the contract method 0x75bbbd73.
   284  //
   285  // Solidity: function binBalanceA() view returns(uint128)
   286  func (_Pool *PoolSession) BinBalanceA() (*big.Int, error) {
   287  	return _Pool.Contract.BinBalanceA(&_Pool.CallOpts)
   288  }
   289  
   290  // BinBalanceA is a free data retrieval call binding the contract method 0x75bbbd73.
   291  //
   292  // Solidity: function binBalanceA() view returns(uint128)
   293  func (_Pool *PoolCallerSession) BinBalanceA() (*big.Int, error) {
   294  	return _Pool.Contract.BinBalanceA(&_Pool.CallOpts)
   295  }
   296  
   297  // BinBalanceB is a free data retrieval call binding the contract method 0xfa158509.
   298  //
   299  // Solidity: function binBalanceB() view returns(uint128)
   300  func (_Pool *PoolCaller) BinBalanceB(opts *bind.CallOpts) (*big.Int, error) {
   301  	var out []interface{}
   302  	err := _Pool.contract.Call(opts, &out, "binBalanceB")
   303  
   304  	if err != nil {
   305  		return *new(*big.Int), err
   306  	}
   307  
   308  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   309  
   310  	return out0, err
   311  
   312  }
   313  
   314  // BinBalanceB is a free data retrieval call binding the contract method 0xfa158509.
   315  //
   316  // Solidity: function binBalanceB() view returns(uint128)
   317  func (_Pool *PoolSession) BinBalanceB() (*big.Int, error) {
   318  	return _Pool.Contract.BinBalanceB(&_Pool.CallOpts)
   319  }
   320  
   321  // BinBalanceB is a free data retrieval call binding the contract method 0xfa158509.
   322  //
   323  // Solidity: function binBalanceB() view returns(uint128)
   324  func (_Pool *PoolCallerSession) BinBalanceB() (*big.Int, error) {
   325  	return _Pool.Contract.BinBalanceB(&_Pool.CallOpts)
   326  }
   327  
   328  // BinMap is a free data retrieval call binding the contract method 0xa2ba172f.
   329  //
   330  // Solidity: function binMap(int32 tick) view returns(uint256)
   331  func (_Pool *PoolCaller) BinMap(opts *bind.CallOpts, tick int32) (*big.Int, error) {
   332  	var out []interface{}
   333  	err := _Pool.contract.Call(opts, &out, "binMap", tick)
   334  
   335  	if err != nil {
   336  		return *new(*big.Int), err
   337  	}
   338  
   339  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   340  
   341  	return out0, err
   342  
   343  }
   344  
   345  // BinMap is a free data retrieval call binding the contract method 0xa2ba172f.
   346  //
   347  // Solidity: function binMap(int32 tick) view returns(uint256)
   348  func (_Pool *PoolSession) BinMap(tick int32) (*big.Int, error) {
   349  	return _Pool.Contract.BinMap(&_Pool.CallOpts, tick)
   350  }
   351  
   352  // BinMap is a free data retrieval call binding the contract method 0xa2ba172f.
   353  //
   354  // Solidity: function binMap(int32 tick) view returns(uint256)
   355  func (_Pool *PoolCallerSession) BinMap(tick int32) (*big.Int, error) {
   356  	return _Pool.Contract.BinMap(&_Pool.CallOpts, tick)
   357  }
   358  
   359  // BinPositions is a free data retrieval call binding the contract method 0x83f9c632.
   360  //
   361  // Solidity: function binPositions(int32 tick, uint256 kind) view returns(uint128)
   362  func (_Pool *PoolCaller) BinPositions(opts *bind.CallOpts, tick int32, kind *big.Int) (*big.Int, error) {
   363  	var out []interface{}
   364  	err := _Pool.contract.Call(opts, &out, "binPositions", tick, kind)
   365  
   366  	if err != nil {
   367  		return *new(*big.Int), err
   368  	}
   369  
   370  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   371  
   372  	return out0, err
   373  
   374  }
   375  
   376  // BinPositions is a free data retrieval call binding the contract method 0x83f9c632.
   377  //
   378  // Solidity: function binPositions(int32 tick, uint256 kind) view returns(uint128)
   379  func (_Pool *PoolSession) BinPositions(tick int32, kind *big.Int) (*big.Int, error) {
   380  	return _Pool.Contract.BinPositions(&_Pool.CallOpts, tick, kind)
   381  }
   382  
   383  // BinPositions is a free data retrieval call binding the contract method 0x83f9c632.
   384  //
   385  // Solidity: function binPositions(int32 tick, uint256 kind) view returns(uint128)
   386  func (_Pool *PoolCallerSession) BinPositions(tick int32, kind *big.Int) (*big.Int, error) {
   387  	return _Pool.Contract.BinPositions(&_Pool.CallOpts, tick, kind)
   388  }
   389  
   390  // Factory is a free data retrieval call binding the contract method 0xc45a0155.
   391  //
   392  // Solidity: function factory() view returns(address)
   393  func (_Pool *PoolCaller) Factory(opts *bind.CallOpts) (common.Address, error) {
   394  	var out []interface{}
   395  	err := _Pool.contract.Call(opts, &out, "factory")
   396  
   397  	if err != nil {
   398  		return *new(common.Address), err
   399  	}
   400  
   401  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   402  
   403  	return out0, err
   404  
   405  }
   406  
   407  // Factory is a free data retrieval call binding the contract method 0xc45a0155.
   408  //
   409  // Solidity: function factory() view returns(address)
   410  func (_Pool *PoolSession) Factory() (common.Address, error) {
   411  	return _Pool.Contract.Factory(&_Pool.CallOpts)
   412  }
   413  
   414  // Factory is a free data retrieval call binding the contract method 0xc45a0155.
   415  //
   416  // Solidity: function factory() view returns(address)
   417  func (_Pool *PoolCallerSession) Factory() (common.Address, error) {
   418  	return _Pool.Contract.Factory(&_Pool.CallOpts)
   419  }
   420  
   421  // Fee is a free data retrieval call binding the contract method 0xddca3f43.
   422  //
   423  // Solidity: function fee() view returns(uint256)
   424  func (_Pool *PoolCaller) Fee(opts *bind.CallOpts) (*big.Int, error) {
   425  	var out []interface{}
   426  	err := _Pool.contract.Call(opts, &out, "fee")
   427  
   428  	if err != nil {
   429  		return *new(*big.Int), err
   430  	}
   431  
   432  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   433  
   434  	return out0, err
   435  
   436  }
   437  
   438  // Fee is a free data retrieval call binding the contract method 0xddca3f43.
   439  //
   440  // Solidity: function fee() view returns(uint256)
   441  func (_Pool *PoolSession) Fee() (*big.Int, error) {
   442  	return _Pool.Contract.Fee(&_Pool.CallOpts)
   443  }
   444  
   445  // Fee is a free data retrieval call binding the contract method 0xddca3f43.
   446  //
   447  // Solidity: function fee() view returns(uint256)
   448  func (_Pool *PoolCallerSession) Fee() (*big.Int, error) {
   449  	return _Pool.Contract.Fee(&_Pool.CallOpts)
   450  }
   451  
   452  // GetBin is a free data retrieval call binding the contract method 0x44a185bb.
   453  //
   454  // Solidity: function getBin(uint128 binId) view returns((uint128,uint128,uint128,uint128,uint128,uint8,int32) bin)
   455  func (_Pool *PoolCaller) GetBin(opts *bind.CallOpts, binId *big.Int) (IPoolBinState, error) {
   456  	var out []interface{}
   457  	err := _Pool.contract.Call(opts, &out, "getBin", binId)
   458  
   459  	if err != nil {
   460  		return *new(IPoolBinState), err
   461  	}
   462  
   463  	out0 := *abi.ConvertType(out[0], new(IPoolBinState)).(*IPoolBinState)
   464  
   465  	return out0, err
   466  
   467  }
   468  
   469  // GetBin is a free data retrieval call binding the contract method 0x44a185bb.
   470  //
   471  // Solidity: function getBin(uint128 binId) view returns((uint128,uint128,uint128,uint128,uint128,uint8,int32) bin)
   472  func (_Pool *PoolSession) GetBin(binId *big.Int) (IPoolBinState, error) {
   473  	return _Pool.Contract.GetBin(&_Pool.CallOpts, binId)
   474  }
   475  
   476  // GetBin is a free data retrieval call binding the contract method 0x44a185bb.
   477  //
   478  // Solidity: function getBin(uint128 binId) view returns((uint128,uint128,uint128,uint128,uint128,uint8,int32) bin)
   479  func (_Pool *PoolCallerSession) GetBin(binId *big.Int) (IPoolBinState, error) {
   480  	return _Pool.Contract.GetBin(&_Pool.CallOpts, binId)
   481  }
   482  
   483  // GetCurrentTwa is a free data retrieval call binding the contract method 0xd3d3861a.
   484  //
   485  // Solidity: function getCurrentTwa() view returns(int256)
   486  func (_Pool *PoolCaller) GetCurrentTwa(opts *bind.CallOpts) (*big.Int, error) {
   487  	var out []interface{}
   488  	err := _Pool.contract.Call(opts, &out, "getCurrentTwa")
   489  
   490  	if err != nil {
   491  		return *new(*big.Int), err
   492  	}
   493  
   494  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   495  
   496  	return out0, err
   497  
   498  }
   499  
   500  // GetCurrentTwa is a free data retrieval call binding the contract method 0xd3d3861a.
   501  //
   502  // Solidity: function getCurrentTwa() view returns(int256)
   503  func (_Pool *PoolSession) GetCurrentTwa() (*big.Int, error) {
   504  	return _Pool.Contract.GetCurrentTwa(&_Pool.CallOpts)
   505  }
   506  
   507  // GetCurrentTwa is a free data retrieval call binding the contract method 0xd3d3861a.
   508  //
   509  // Solidity: function getCurrentTwa() view returns(int256)
   510  func (_Pool *PoolCallerSession) GetCurrentTwa() (*big.Int, error) {
   511  	return _Pool.Contract.GetCurrentTwa(&_Pool.CallOpts)
   512  }
   513  
   514  // GetState is a free data retrieval call binding the contract method 0x1865c57d.
   515  //
   516  // Solidity: function getState() view returns((int32,uint8,uint128,uint64))
   517  func (_Pool *PoolCaller) GetState(opts *bind.CallOpts) (IPoolState, error) {
   518  	var out []interface{}
   519  	err := _Pool.contract.Call(opts, &out, "getState")
   520  
   521  	if err != nil {
   522  		return *new(IPoolState), err
   523  	}
   524  
   525  	out0 := *abi.ConvertType(out[0], new(IPoolState)).(*IPoolState)
   526  
   527  	return out0, err
   528  
   529  }
   530  
   531  // GetState is a free data retrieval call binding the contract method 0x1865c57d.
   532  //
   533  // Solidity: function getState() view returns((int32,uint8,uint128,uint64))
   534  func (_Pool *PoolSession) GetState() (IPoolState, error) {
   535  	return _Pool.Contract.GetState(&_Pool.CallOpts)
   536  }
   537  
   538  // GetState is a free data retrieval call binding the contract method 0x1865c57d.
   539  //
   540  // Solidity: function getState() view returns((int32,uint8,uint128,uint64))
   541  func (_Pool *PoolCallerSession) GetState() (IPoolState, error) {
   542  	return _Pool.Contract.GetState(&_Pool.CallOpts)
   543  }
   544  
   545  // GetTwa is a free data retrieval call binding the contract method 0xa4ed496a.
   546  //
   547  // Solidity: function getTwa() view returns((int96,int96,uint64))
   548  func (_Pool *PoolCaller) GetTwa(opts *bind.CallOpts) (IPoolTwaState, error) {
   549  	var out []interface{}
   550  	err := _Pool.contract.Call(opts, &out, "getTwa")
   551  
   552  	if err != nil {
   553  		return *new(IPoolTwaState), err
   554  	}
   555  
   556  	out0 := *abi.ConvertType(out[0], new(IPoolTwaState)).(*IPoolTwaState)
   557  
   558  	return out0, err
   559  
   560  }
   561  
   562  // GetTwa is a free data retrieval call binding the contract method 0xa4ed496a.
   563  //
   564  // Solidity: function getTwa() view returns((int96,int96,uint64))
   565  func (_Pool *PoolSession) GetTwa() (IPoolTwaState, error) {
   566  	return _Pool.Contract.GetTwa(&_Pool.CallOpts)
   567  }
   568  
   569  // GetTwa is a free data retrieval call binding the contract method 0xa4ed496a.
   570  //
   571  // Solidity: function getTwa() view returns((int96,int96,uint64))
   572  func (_Pool *PoolCallerSession) GetTwa() (IPoolTwaState, error) {
   573  	return _Pool.Contract.GetTwa(&_Pool.CallOpts)
   574  }
   575  
   576  // TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.
   577  //
   578  // Solidity: function tickSpacing() view returns(uint256)
   579  func (_Pool *PoolCaller) TickSpacing(opts *bind.CallOpts) (*big.Int, error) {
   580  	var out []interface{}
   581  	err := _Pool.contract.Call(opts, &out, "tickSpacing")
   582  
   583  	if err != nil {
   584  		return *new(*big.Int), err
   585  	}
   586  
   587  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   588  
   589  	return out0, err
   590  
   591  }
   592  
   593  // TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.
   594  //
   595  // Solidity: function tickSpacing() view returns(uint256)
   596  func (_Pool *PoolSession) TickSpacing() (*big.Int, error) {
   597  	return _Pool.Contract.TickSpacing(&_Pool.CallOpts)
   598  }
   599  
   600  // TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.
   601  //
   602  // Solidity: function tickSpacing() view returns(uint256)
   603  func (_Pool *PoolCallerSession) TickSpacing() (*big.Int, error) {
   604  	return _Pool.Contract.TickSpacing(&_Pool.CallOpts)
   605  }
   606  
   607  // TokenA is a free data retrieval call binding the contract method 0x0fc63d10.
   608  //
   609  // Solidity: function tokenA() view returns(address)
   610  func (_Pool *PoolCaller) TokenA(opts *bind.CallOpts) (common.Address, error) {
   611  	var out []interface{}
   612  	err := _Pool.contract.Call(opts, &out, "tokenA")
   613  
   614  	if err != nil {
   615  		return *new(common.Address), err
   616  	}
   617  
   618  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   619  
   620  	return out0, err
   621  
   622  }
   623  
   624  // TokenA is a free data retrieval call binding the contract method 0x0fc63d10.
   625  //
   626  // Solidity: function tokenA() view returns(address)
   627  func (_Pool *PoolSession) TokenA() (common.Address, error) {
   628  	return _Pool.Contract.TokenA(&_Pool.CallOpts)
   629  }
   630  
   631  // TokenA is a free data retrieval call binding the contract method 0x0fc63d10.
   632  //
   633  // Solidity: function tokenA() view returns(address)
   634  func (_Pool *PoolCallerSession) TokenA() (common.Address, error) {
   635  	return _Pool.Contract.TokenA(&_Pool.CallOpts)
   636  }
   637  
   638  // TokenAScale is a free data retrieval call binding the contract method 0x3ab72c10.
   639  //
   640  // Solidity: function tokenAScale() view returns(uint256)
   641  func (_Pool *PoolCaller) TokenAScale(opts *bind.CallOpts) (*big.Int, error) {
   642  	var out []interface{}
   643  	err := _Pool.contract.Call(opts, &out, "tokenAScale")
   644  
   645  	if err != nil {
   646  		return *new(*big.Int), err
   647  	}
   648  
   649  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   650  
   651  	return out0, err
   652  
   653  }
   654  
   655  // TokenAScale is a free data retrieval call binding the contract method 0x3ab72c10.
   656  //
   657  // Solidity: function tokenAScale() view returns(uint256)
   658  func (_Pool *PoolSession) TokenAScale() (*big.Int, error) {
   659  	return _Pool.Contract.TokenAScale(&_Pool.CallOpts)
   660  }
   661  
   662  // TokenAScale is a free data retrieval call binding the contract method 0x3ab72c10.
   663  //
   664  // Solidity: function tokenAScale() view returns(uint256)
   665  func (_Pool *PoolCallerSession) TokenAScale() (*big.Int, error) {
   666  	return _Pool.Contract.TokenAScale(&_Pool.CallOpts)
   667  }
   668  
   669  // TokenB is a free data retrieval call binding the contract method 0x5f64b55b.
   670  //
   671  // Solidity: function tokenB() view returns(address)
   672  func (_Pool *PoolCaller) TokenB(opts *bind.CallOpts) (common.Address, error) {
   673  	var out []interface{}
   674  	err := _Pool.contract.Call(opts, &out, "tokenB")
   675  
   676  	if err != nil {
   677  		return *new(common.Address), err
   678  	}
   679  
   680  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   681  
   682  	return out0, err
   683  
   684  }
   685  
   686  // TokenB is a free data retrieval call binding the contract method 0x5f64b55b.
   687  //
   688  // Solidity: function tokenB() view returns(address)
   689  func (_Pool *PoolSession) TokenB() (common.Address, error) {
   690  	return _Pool.Contract.TokenB(&_Pool.CallOpts)
   691  }
   692  
   693  // TokenB is a free data retrieval call binding the contract method 0x5f64b55b.
   694  //
   695  // Solidity: function tokenB() view returns(address)
   696  func (_Pool *PoolCallerSession) TokenB() (common.Address, error) {
   697  	return _Pool.Contract.TokenB(&_Pool.CallOpts)
   698  }
   699  
   700  // TokenBScale is a free data retrieval call binding the contract method 0x21272d4c.
   701  //
   702  // Solidity: function tokenBScale() view returns(uint256)
   703  func (_Pool *PoolCaller) TokenBScale(opts *bind.CallOpts) (*big.Int, error) {
   704  	var out []interface{}
   705  	err := _Pool.contract.Call(opts, &out, "tokenBScale")
   706  
   707  	if err != nil {
   708  		return *new(*big.Int), err
   709  	}
   710  
   711  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   712  
   713  	return out0, err
   714  
   715  }
   716  
   717  // TokenBScale is a free data retrieval call binding the contract method 0x21272d4c.
   718  //
   719  // Solidity: function tokenBScale() view returns(uint256)
   720  func (_Pool *PoolSession) TokenBScale() (*big.Int, error) {
   721  	return _Pool.Contract.TokenBScale(&_Pool.CallOpts)
   722  }
   723  
   724  // TokenBScale is a free data retrieval call binding the contract method 0x21272d4c.
   725  //
   726  // Solidity: function tokenBScale() view returns(uint256)
   727  func (_Pool *PoolCallerSession) TokenBScale() (*big.Int, error) {
   728  	return _Pool.Contract.TokenBScale(&_Pool.CallOpts)
   729  }
   730  
   731  // AddLiquidity is a paid mutator transaction binding the contract method 0x9d5f20bb.
   732  //
   733  // Solidity: function addLiquidity(uint256 tokenId, (uint8,int32,bool,uint128,uint128)[] params, bytes data) returns(uint256 tokenAAmount, uint256 tokenBAmount, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   734  func (_Pool *PoolTransactor) AddLiquidity(opts *bind.TransactOpts, tokenId *big.Int, params []IPoolAddLiquidityParams, data []byte) (*types.Transaction, error) {
   735  	return _Pool.contract.Transact(opts, "addLiquidity", tokenId, params, data)
   736  }
   737  
   738  // AddLiquidity is a paid mutator transaction binding the contract method 0x9d5f20bb.
   739  //
   740  // Solidity: function addLiquidity(uint256 tokenId, (uint8,int32,bool,uint128,uint128)[] params, bytes data) returns(uint256 tokenAAmount, uint256 tokenBAmount, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   741  func (_Pool *PoolSession) AddLiquidity(tokenId *big.Int, params []IPoolAddLiquidityParams, data []byte) (*types.Transaction, error) {
   742  	return _Pool.Contract.AddLiquidity(&_Pool.TransactOpts, tokenId, params, data)
   743  }
   744  
   745  // AddLiquidity is a paid mutator transaction binding the contract method 0x9d5f20bb.
   746  //
   747  // Solidity: function addLiquidity(uint256 tokenId, (uint8,int32,bool,uint128,uint128)[] params, bytes data) returns(uint256 tokenAAmount, uint256 tokenBAmount, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   748  func (_Pool *PoolTransactorSession) AddLiquidity(tokenId *big.Int, params []IPoolAddLiquidityParams, data []byte) (*types.Transaction, error) {
   749  	return _Pool.Contract.AddLiquidity(&_Pool.TransactOpts, tokenId, params, data)
   750  }
   751  
   752  // MigrateBinUpStack is a paid mutator transaction binding the contract method 0xc0c5d7fb.
   753  //
   754  // Solidity: function migrateBinUpStack(uint128 binId, uint32 maxRecursion) returns()
   755  func (_Pool *PoolTransactor) MigrateBinUpStack(opts *bind.TransactOpts, binId *big.Int, maxRecursion uint32) (*types.Transaction, error) {
   756  	return _Pool.contract.Transact(opts, "migrateBinUpStack", binId, maxRecursion)
   757  }
   758  
   759  // MigrateBinUpStack is a paid mutator transaction binding the contract method 0xc0c5d7fb.
   760  //
   761  // Solidity: function migrateBinUpStack(uint128 binId, uint32 maxRecursion) returns()
   762  func (_Pool *PoolSession) MigrateBinUpStack(binId *big.Int, maxRecursion uint32) (*types.Transaction, error) {
   763  	return _Pool.Contract.MigrateBinUpStack(&_Pool.TransactOpts, binId, maxRecursion)
   764  }
   765  
   766  // MigrateBinUpStack is a paid mutator transaction binding the contract method 0xc0c5d7fb.
   767  //
   768  // Solidity: function migrateBinUpStack(uint128 binId, uint32 maxRecursion) returns()
   769  func (_Pool *PoolTransactorSession) MigrateBinUpStack(binId *big.Int, maxRecursion uint32) (*types.Transaction, error) {
   770  	return _Pool.Contract.MigrateBinUpStack(&_Pool.TransactOpts, binId, maxRecursion)
   771  }
   772  
   773  // RemoveLiquidity is a paid mutator transaction binding the contract method 0x57c8c7b0.
   774  //
   775  // Solidity: function removeLiquidity(address recipient, uint256 tokenId, (uint128,uint128)[] params) returns(uint256 tokenAOut, uint256 tokenBOut, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   776  func (_Pool *PoolTransactor) RemoveLiquidity(opts *bind.TransactOpts, recipient common.Address, tokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error) {
   777  	return _Pool.contract.Transact(opts, "removeLiquidity", recipient, tokenId, params)
   778  }
   779  
   780  // RemoveLiquidity is a paid mutator transaction binding the contract method 0x57c8c7b0.
   781  //
   782  // Solidity: function removeLiquidity(address recipient, uint256 tokenId, (uint128,uint128)[] params) returns(uint256 tokenAOut, uint256 tokenBOut, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   783  func (_Pool *PoolSession) RemoveLiquidity(recipient common.Address, tokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error) {
   784  	return _Pool.Contract.RemoveLiquidity(&_Pool.TransactOpts, recipient, tokenId, params)
   785  }
   786  
   787  // RemoveLiquidity is a paid mutator transaction binding the contract method 0x57c8c7b0.
   788  //
   789  // Solidity: function removeLiquidity(address recipient, uint256 tokenId, (uint128,uint128)[] params) returns(uint256 tokenAOut, uint256 tokenBOut, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   790  func (_Pool *PoolTransactorSession) RemoveLiquidity(recipient common.Address, tokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error) {
   791  	return _Pool.Contract.RemoveLiquidity(&_Pool.TransactOpts, recipient, tokenId, params)
   792  }
   793  
   794  // Swap is a paid mutator transaction binding the contract method 0xc51c9029.
   795  //
   796  // Solidity: function swap(address recipient, uint256 amount, bool tokenAIn, bool exactOutput, uint256 sqrtPriceLimit, bytes data) returns(uint256 amountIn, uint256 amountOut)
   797  func (_Pool *PoolTransactor) Swap(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, tokenAIn bool, exactOutput bool, sqrtPriceLimit *big.Int, data []byte) (*types.Transaction, error) {
   798  	return _Pool.contract.Transact(opts, "swap", recipient, amount, tokenAIn, exactOutput, sqrtPriceLimit, data)
   799  }
   800  
   801  // Swap is a paid mutator transaction binding the contract method 0xc51c9029.
   802  //
   803  // Solidity: function swap(address recipient, uint256 amount, bool tokenAIn, bool exactOutput, uint256 sqrtPriceLimit, bytes data) returns(uint256 amountIn, uint256 amountOut)
   804  func (_Pool *PoolSession) Swap(recipient common.Address, amount *big.Int, tokenAIn bool, exactOutput bool, sqrtPriceLimit *big.Int, data []byte) (*types.Transaction, error) {
   805  	return _Pool.Contract.Swap(&_Pool.TransactOpts, recipient, amount, tokenAIn, exactOutput, sqrtPriceLimit, data)
   806  }
   807  
   808  // Swap is a paid mutator transaction binding the contract method 0xc51c9029.
   809  //
   810  // Solidity: function swap(address recipient, uint256 amount, bool tokenAIn, bool exactOutput, uint256 sqrtPriceLimit, bytes data) returns(uint256 amountIn, uint256 amountOut)
   811  func (_Pool *PoolTransactorSession) Swap(recipient common.Address, amount *big.Int, tokenAIn bool, exactOutput bool, sqrtPriceLimit *big.Int, data []byte) (*types.Transaction, error) {
   812  	return _Pool.Contract.Swap(&_Pool.TransactOpts, recipient, amount, tokenAIn, exactOutput, sqrtPriceLimit, data)
   813  }
   814  
   815  // TransferLiquidity is a paid mutator transaction binding the contract method 0xd279735f.
   816  //
   817  // Solidity: function transferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params) returns()
   818  func (_Pool *PoolTransactor) TransferLiquidity(opts *bind.TransactOpts, fromTokenId *big.Int, toTokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error) {
   819  	return _Pool.contract.Transact(opts, "transferLiquidity", fromTokenId, toTokenId, params)
   820  }
   821  
   822  // TransferLiquidity is a paid mutator transaction binding the contract method 0xd279735f.
   823  //
   824  // Solidity: function transferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params) returns()
   825  func (_Pool *PoolSession) TransferLiquidity(fromTokenId *big.Int, toTokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error) {
   826  	return _Pool.Contract.TransferLiquidity(&_Pool.TransactOpts, fromTokenId, toTokenId, params)
   827  }
   828  
   829  // TransferLiquidity is a paid mutator transaction binding the contract method 0xd279735f.
   830  //
   831  // Solidity: function transferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params) returns()
   832  func (_Pool *PoolTransactorSession) TransferLiquidity(fromTokenId *big.Int, toTokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error) {
   833  	return _Pool.Contract.TransferLiquidity(&_Pool.TransactOpts, fromTokenId, toTokenId, params)
   834  }
   835  
   836  // PoolAddLiquidityIterator is returned from FilterAddLiquidity and is used to iterate over the raw logs and unpacked data for AddLiquidity events raised by the Pool contract.
   837  type PoolAddLiquidityIterator struct {
   838  	Event *PoolAddLiquidity // Event containing the contract specifics and raw log
   839  
   840  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   841  	event    string              // Event name to use for unpacking event data
   842  
   843  	logs chan types.Log        // Log channel receiving the found contract events
   844  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   845  	done bool                  // Whether the subscription completed delivering logs
   846  	fail error                 // Occurred error to stop iteration
   847  }
   848  
   849  // Next advances the iterator to the subsequent event, returning whether there
   850  // are any more events found. In case of a retrieval or parsing error, false is
   851  // returned and Error() can be queried for the exact failure.
   852  func (it *PoolAddLiquidityIterator) Next() bool {
   853  	// If the iterator failed, stop iterating
   854  	if it.fail != nil {
   855  		return false
   856  	}
   857  	// If the iterator completed, deliver directly whatever's available
   858  	if it.done {
   859  		select {
   860  		case log := <-it.logs:
   861  			it.Event = new(PoolAddLiquidity)
   862  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   863  				it.fail = err
   864  				return false
   865  			}
   866  			it.Event.Raw = log
   867  			return true
   868  
   869  		default:
   870  			return false
   871  		}
   872  	}
   873  	// Iterator still in progress, wait for either a data or an error event
   874  	select {
   875  	case log := <-it.logs:
   876  		it.Event = new(PoolAddLiquidity)
   877  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   878  			it.fail = err
   879  			return false
   880  		}
   881  		it.Event.Raw = log
   882  		return true
   883  
   884  	case err := <-it.sub.Err():
   885  		it.done = true
   886  		it.fail = err
   887  		return it.Next()
   888  	}
   889  }
   890  
   891  // Error returns any retrieval or parsing error occurred during filtering.
   892  func (it *PoolAddLiquidityIterator) Error() error {
   893  	return it.fail
   894  }
   895  
   896  // Close terminates the iteration process, releasing any pending underlying
   897  // resources.
   898  func (it *PoolAddLiquidityIterator) Close() error {
   899  	it.sub.Unsubscribe()
   900  	return nil
   901  }
   902  
   903  // PoolAddLiquidity represents a AddLiquidity event raised by the Pool contract.
   904  type PoolAddLiquidity struct {
   905  	Sender    common.Address
   906  	TokenId   *big.Int
   907  	BinDeltas []IPoolBinDelta
   908  	Raw       types.Log // Blockchain specific contextual infos
   909  }
   910  
   911  // FilterAddLiquidity is a free log retrieval operation binding the contract event 0x133a027327582be2089f6ca47137e3d337be4ca2cd921e5f0b178c9c2d5b8364.
   912  //
   913  // Solidity: event AddLiquidity(address indexed sender, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   914  func (_Pool *PoolFilterer) FilterAddLiquidity(opts *bind.FilterOpts, sender []common.Address, tokenId []*big.Int) (*PoolAddLiquidityIterator, error) {
   915  
   916  	var senderRule []interface{}
   917  	for _, senderItem := range sender {
   918  		senderRule = append(senderRule, senderItem)
   919  	}
   920  	var tokenIdRule []interface{}
   921  	for _, tokenIdItem := range tokenId {
   922  		tokenIdRule = append(tokenIdRule, tokenIdItem)
   923  	}
   924  
   925  	logs, sub, err := _Pool.contract.FilterLogs(opts, "AddLiquidity", senderRule, tokenIdRule)
   926  	if err != nil {
   927  		return nil, err
   928  	}
   929  	return &PoolAddLiquidityIterator{contract: _Pool.contract, event: "AddLiquidity", logs: logs, sub: sub}, nil
   930  }
   931  
   932  // WatchAddLiquidity is a free log subscription operation binding the contract event 0x133a027327582be2089f6ca47137e3d337be4ca2cd921e5f0b178c9c2d5b8364.
   933  //
   934  // Solidity: event AddLiquidity(address indexed sender, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   935  func (_Pool *PoolFilterer) WatchAddLiquidity(opts *bind.WatchOpts, sink chan<- *PoolAddLiquidity, sender []common.Address, tokenId []*big.Int) (event.Subscription, error) {
   936  
   937  	var senderRule []interface{}
   938  	for _, senderItem := range sender {
   939  		senderRule = append(senderRule, senderItem)
   940  	}
   941  	var tokenIdRule []interface{}
   942  	for _, tokenIdItem := range tokenId {
   943  		tokenIdRule = append(tokenIdRule, tokenIdItem)
   944  	}
   945  
   946  	logs, sub, err := _Pool.contract.WatchLogs(opts, "AddLiquidity", senderRule, tokenIdRule)
   947  	if err != nil {
   948  		return nil, err
   949  	}
   950  	return event.NewSubscription(func(quit <-chan struct{}) error {
   951  		defer sub.Unsubscribe()
   952  		for {
   953  			select {
   954  			case log := <-logs:
   955  				// New log arrived, parse the event and forward to the user
   956  				event := new(PoolAddLiquidity)
   957  				if err := _Pool.contract.UnpackLog(event, "AddLiquidity", log); err != nil {
   958  					return err
   959  				}
   960  				event.Raw = log
   961  
   962  				select {
   963  				case sink <- event:
   964  				case err := <-sub.Err():
   965  					return err
   966  				case <-quit:
   967  					return nil
   968  				}
   969  			case err := <-sub.Err():
   970  				return err
   971  			case <-quit:
   972  				return nil
   973  			}
   974  		}
   975  	}), nil
   976  }
   977  
   978  // ParseAddLiquidity is a log parse operation binding the contract event 0x133a027327582be2089f6ca47137e3d337be4ca2cd921e5f0b178c9c2d5b8364.
   979  //
   980  // Solidity: event AddLiquidity(address indexed sender, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
   981  func (_Pool *PoolFilterer) ParseAddLiquidity(log types.Log) (*PoolAddLiquidity, error) {
   982  	event := new(PoolAddLiquidity)
   983  	if err := _Pool.contract.UnpackLog(event, "AddLiquidity", log); err != nil {
   984  		return nil, err
   985  	}
   986  	event.Raw = log
   987  	return event, nil
   988  }
   989  
   990  // PoolBinMergedIterator is returned from FilterBinMerged and is used to iterate over the raw logs and unpacked data for BinMerged events raised by the Pool contract.
   991  type PoolBinMergedIterator struct {
   992  	Event *PoolBinMerged // Event containing the contract specifics and raw log
   993  
   994  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   995  	event    string              // Event name to use for unpacking event data
   996  
   997  	logs chan types.Log        // Log channel receiving the found contract events
   998  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   999  	done bool                  // Whether the subscription completed delivering logs
  1000  	fail error                 // Occurred error to stop iteration
  1001  }
  1002  
  1003  // Next advances the iterator to the subsequent event, returning whether there
  1004  // are any more events found. In case of a retrieval or parsing error, false is
  1005  // returned and Error() can be queried for the exact failure.
  1006  func (it *PoolBinMergedIterator) Next() bool {
  1007  	// If the iterator failed, stop iterating
  1008  	if it.fail != nil {
  1009  		return false
  1010  	}
  1011  	// If the iterator completed, deliver directly whatever's available
  1012  	if it.done {
  1013  		select {
  1014  		case log := <-it.logs:
  1015  			it.Event = new(PoolBinMerged)
  1016  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1017  				it.fail = err
  1018  				return false
  1019  			}
  1020  			it.Event.Raw = log
  1021  			return true
  1022  
  1023  		default:
  1024  			return false
  1025  		}
  1026  	}
  1027  	// Iterator still in progress, wait for either a data or an error event
  1028  	select {
  1029  	case log := <-it.logs:
  1030  		it.Event = new(PoolBinMerged)
  1031  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1032  			it.fail = err
  1033  			return false
  1034  		}
  1035  		it.Event.Raw = log
  1036  		return true
  1037  
  1038  	case err := <-it.sub.Err():
  1039  		it.done = true
  1040  		it.fail = err
  1041  		return it.Next()
  1042  	}
  1043  }
  1044  
  1045  // Error returns any retrieval or parsing error occurred during filtering.
  1046  func (it *PoolBinMergedIterator) Error() error {
  1047  	return it.fail
  1048  }
  1049  
  1050  // Close terminates the iteration process, releasing any pending underlying
  1051  // resources.
  1052  func (it *PoolBinMergedIterator) Close() error {
  1053  	it.sub.Unsubscribe()
  1054  	return nil
  1055  }
  1056  
  1057  // PoolBinMerged represents a BinMerged event raised by the Pool contract.
  1058  type PoolBinMerged struct {
  1059  	BinId    *big.Int
  1060  	ReserveA *big.Int
  1061  	ReserveB *big.Int
  1062  	MergeId  *big.Int
  1063  	Raw      types.Log // Blockchain specific contextual infos
  1064  }
  1065  
  1066  // FilterBinMerged is a free log retrieval operation binding the contract event 0x8ecf1f9da718dc4c174482cdb4e334113856b46a85e5694deeec06d512e8f772.
  1067  //
  1068  // Solidity: event BinMerged(uint128 indexed binId, uint128 reserveA, uint128 reserveB, uint128 mergeId)
  1069  func (_Pool *PoolFilterer) FilterBinMerged(opts *bind.FilterOpts, binId []*big.Int) (*PoolBinMergedIterator, error) {
  1070  
  1071  	var binIdRule []interface{}
  1072  	for _, binIdItem := range binId {
  1073  		binIdRule = append(binIdRule, binIdItem)
  1074  	}
  1075  
  1076  	logs, sub, err := _Pool.contract.FilterLogs(opts, "BinMerged", binIdRule)
  1077  	if err != nil {
  1078  		return nil, err
  1079  	}
  1080  	return &PoolBinMergedIterator{contract: _Pool.contract, event: "BinMerged", logs: logs, sub: sub}, nil
  1081  }
  1082  
  1083  // WatchBinMerged is a free log subscription operation binding the contract event 0x8ecf1f9da718dc4c174482cdb4e334113856b46a85e5694deeec06d512e8f772.
  1084  //
  1085  // Solidity: event BinMerged(uint128 indexed binId, uint128 reserveA, uint128 reserveB, uint128 mergeId)
  1086  func (_Pool *PoolFilterer) WatchBinMerged(opts *bind.WatchOpts, sink chan<- *PoolBinMerged, binId []*big.Int) (event.Subscription, error) {
  1087  
  1088  	var binIdRule []interface{}
  1089  	for _, binIdItem := range binId {
  1090  		binIdRule = append(binIdRule, binIdItem)
  1091  	}
  1092  
  1093  	logs, sub, err := _Pool.contract.WatchLogs(opts, "BinMerged", binIdRule)
  1094  	if err != nil {
  1095  		return nil, err
  1096  	}
  1097  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1098  		defer sub.Unsubscribe()
  1099  		for {
  1100  			select {
  1101  			case log := <-logs:
  1102  				// New log arrived, parse the event and forward to the user
  1103  				event := new(PoolBinMerged)
  1104  				if err := _Pool.contract.UnpackLog(event, "BinMerged", log); err != nil {
  1105  					return err
  1106  				}
  1107  				event.Raw = log
  1108  
  1109  				select {
  1110  				case sink <- event:
  1111  				case err := <-sub.Err():
  1112  					return err
  1113  				case <-quit:
  1114  					return nil
  1115  				}
  1116  			case err := <-sub.Err():
  1117  				return err
  1118  			case <-quit:
  1119  				return nil
  1120  			}
  1121  		}
  1122  	}), nil
  1123  }
  1124  
  1125  // ParseBinMerged is a log parse operation binding the contract event 0x8ecf1f9da718dc4c174482cdb4e334113856b46a85e5694deeec06d512e8f772.
  1126  //
  1127  // Solidity: event BinMerged(uint128 indexed binId, uint128 reserveA, uint128 reserveB, uint128 mergeId)
  1128  func (_Pool *PoolFilterer) ParseBinMerged(log types.Log) (*PoolBinMerged, error) {
  1129  	event := new(PoolBinMerged)
  1130  	if err := _Pool.contract.UnpackLog(event, "BinMerged", log); err != nil {
  1131  		return nil, err
  1132  	}
  1133  	event.Raw = log
  1134  	return event, nil
  1135  }
  1136  
  1137  // PoolBinMovedIterator is returned from FilterBinMoved and is used to iterate over the raw logs and unpacked data for BinMoved events raised by the Pool contract.
  1138  type PoolBinMovedIterator struct {
  1139  	Event *PoolBinMoved // Event containing the contract specifics and raw log
  1140  
  1141  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1142  	event    string              // Event name to use for unpacking event data
  1143  
  1144  	logs chan types.Log        // Log channel receiving the found contract events
  1145  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1146  	done bool                  // Whether the subscription completed delivering logs
  1147  	fail error                 // Occurred error to stop iteration
  1148  }
  1149  
  1150  // Next advances the iterator to the subsequent event, returning whether there
  1151  // are any more events found. In case of a retrieval or parsing error, false is
  1152  // returned and Error() can be queried for the exact failure.
  1153  func (it *PoolBinMovedIterator) Next() bool {
  1154  	// If the iterator failed, stop iterating
  1155  	if it.fail != nil {
  1156  		return false
  1157  	}
  1158  	// If the iterator completed, deliver directly whatever's available
  1159  	if it.done {
  1160  		select {
  1161  		case log := <-it.logs:
  1162  			it.Event = new(PoolBinMoved)
  1163  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1164  				it.fail = err
  1165  				return false
  1166  			}
  1167  			it.Event.Raw = log
  1168  			return true
  1169  
  1170  		default:
  1171  			return false
  1172  		}
  1173  	}
  1174  	// Iterator still in progress, wait for either a data or an error event
  1175  	select {
  1176  	case log := <-it.logs:
  1177  		it.Event = new(PoolBinMoved)
  1178  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1179  			it.fail = err
  1180  			return false
  1181  		}
  1182  		it.Event.Raw = log
  1183  		return true
  1184  
  1185  	case err := <-it.sub.Err():
  1186  		it.done = true
  1187  		it.fail = err
  1188  		return it.Next()
  1189  	}
  1190  }
  1191  
  1192  // Error returns any retrieval or parsing error occurred during filtering.
  1193  func (it *PoolBinMovedIterator) Error() error {
  1194  	return it.fail
  1195  }
  1196  
  1197  // Close terminates the iteration process, releasing any pending underlying
  1198  // resources.
  1199  func (it *PoolBinMovedIterator) Close() error {
  1200  	it.sub.Unsubscribe()
  1201  	return nil
  1202  }
  1203  
  1204  // PoolBinMoved represents a BinMoved event raised by the Pool contract.
  1205  type PoolBinMoved struct {
  1206  	BinId        *big.Int
  1207  	PreviousTick *big.Int
  1208  	NewTick      *big.Int
  1209  	Raw          types.Log // Blockchain specific contextual infos
  1210  }
  1211  
  1212  // FilterBinMoved is a free log retrieval operation binding the contract event 0x42e51620e75096344ac889cc1d899ab619aedbe89a4f6b230ee3cecb849c7e2f.
  1213  //
  1214  // Solidity: event BinMoved(uint128 indexed binId, int128 previousTick, int128 newTick)
  1215  func (_Pool *PoolFilterer) FilterBinMoved(opts *bind.FilterOpts, binId []*big.Int) (*PoolBinMovedIterator, error) {
  1216  
  1217  	var binIdRule []interface{}
  1218  	for _, binIdItem := range binId {
  1219  		binIdRule = append(binIdRule, binIdItem)
  1220  	}
  1221  
  1222  	logs, sub, err := _Pool.contract.FilterLogs(opts, "BinMoved", binIdRule)
  1223  	if err != nil {
  1224  		return nil, err
  1225  	}
  1226  	return &PoolBinMovedIterator{contract: _Pool.contract, event: "BinMoved", logs: logs, sub: sub}, nil
  1227  }
  1228  
  1229  // WatchBinMoved is a free log subscription operation binding the contract event 0x42e51620e75096344ac889cc1d899ab619aedbe89a4f6b230ee3cecb849c7e2f.
  1230  //
  1231  // Solidity: event BinMoved(uint128 indexed binId, int128 previousTick, int128 newTick)
  1232  func (_Pool *PoolFilterer) WatchBinMoved(opts *bind.WatchOpts, sink chan<- *PoolBinMoved, binId []*big.Int) (event.Subscription, error) {
  1233  
  1234  	var binIdRule []interface{}
  1235  	for _, binIdItem := range binId {
  1236  		binIdRule = append(binIdRule, binIdItem)
  1237  	}
  1238  
  1239  	logs, sub, err := _Pool.contract.WatchLogs(opts, "BinMoved", binIdRule)
  1240  	if err != nil {
  1241  		return nil, err
  1242  	}
  1243  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1244  		defer sub.Unsubscribe()
  1245  		for {
  1246  			select {
  1247  			case log := <-logs:
  1248  				// New log arrived, parse the event and forward to the user
  1249  				event := new(PoolBinMoved)
  1250  				if err := _Pool.contract.UnpackLog(event, "BinMoved", log); err != nil {
  1251  					return err
  1252  				}
  1253  				event.Raw = log
  1254  
  1255  				select {
  1256  				case sink <- event:
  1257  				case err := <-sub.Err():
  1258  					return err
  1259  				case <-quit:
  1260  					return nil
  1261  				}
  1262  			case err := <-sub.Err():
  1263  				return err
  1264  			case <-quit:
  1265  				return nil
  1266  			}
  1267  		}
  1268  	}), nil
  1269  }
  1270  
  1271  // ParseBinMoved is a log parse operation binding the contract event 0x42e51620e75096344ac889cc1d899ab619aedbe89a4f6b230ee3cecb849c7e2f.
  1272  //
  1273  // Solidity: event BinMoved(uint128 indexed binId, int128 previousTick, int128 newTick)
  1274  func (_Pool *PoolFilterer) ParseBinMoved(log types.Log) (*PoolBinMoved, error) {
  1275  	event := new(PoolBinMoved)
  1276  	if err := _Pool.contract.UnpackLog(event, "BinMoved", log); err != nil {
  1277  		return nil, err
  1278  	}
  1279  	event.Raw = log
  1280  	return event, nil
  1281  }
  1282  
  1283  // PoolMigrateBinsUpStackIterator is returned from FilterMigrateBinsUpStack and is used to iterate over the raw logs and unpacked data for MigrateBinsUpStack events raised by the Pool contract.
  1284  type PoolMigrateBinsUpStackIterator struct {
  1285  	Event *PoolMigrateBinsUpStack // Event containing the contract specifics and raw log
  1286  
  1287  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1288  	event    string              // Event name to use for unpacking event data
  1289  
  1290  	logs chan types.Log        // Log channel receiving the found contract events
  1291  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1292  	done bool                  // Whether the subscription completed delivering logs
  1293  	fail error                 // Occurred error to stop iteration
  1294  }
  1295  
  1296  // Next advances the iterator to the subsequent event, returning whether there
  1297  // are any more events found. In case of a retrieval or parsing error, false is
  1298  // returned and Error() can be queried for the exact failure.
  1299  func (it *PoolMigrateBinsUpStackIterator) Next() bool {
  1300  	// If the iterator failed, stop iterating
  1301  	if it.fail != nil {
  1302  		return false
  1303  	}
  1304  	// If the iterator completed, deliver directly whatever's available
  1305  	if it.done {
  1306  		select {
  1307  		case log := <-it.logs:
  1308  			it.Event = new(PoolMigrateBinsUpStack)
  1309  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1310  				it.fail = err
  1311  				return false
  1312  			}
  1313  			it.Event.Raw = log
  1314  			return true
  1315  
  1316  		default:
  1317  			return false
  1318  		}
  1319  	}
  1320  	// Iterator still in progress, wait for either a data or an error event
  1321  	select {
  1322  	case log := <-it.logs:
  1323  		it.Event = new(PoolMigrateBinsUpStack)
  1324  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1325  			it.fail = err
  1326  			return false
  1327  		}
  1328  		it.Event.Raw = log
  1329  		return true
  1330  
  1331  	case err := <-it.sub.Err():
  1332  		it.done = true
  1333  		it.fail = err
  1334  		return it.Next()
  1335  	}
  1336  }
  1337  
  1338  // Error returns any retrieval or parsing error occurred during filtering.
  1339  func (it *PoolMigrateBinsUpStackIterator) Error() error {
  1340  	return it.fail
  1341  }
  1342  
  1343  // Close terminates the iteration process, releasing any pending underlying
  1344  // resources.
  1345  func (it *PoolMigrateBinsUpStackIterator) Close() error {
  1346  	it.sub.Unsubscribe()
  1347  	return nil
  1348  }
  1349  
  1350  // PoolMigrateBinsUpStack represents a MigrateBinsUpStack event raised by the Pool contract.
  1351  type PoolMigrateBinsUpStack struct {
  1352  	Sender       common.Address
  1353  	BinId        *big.Int
  1354  	MaxRecursion uint32
  1355  	Raw          types.Log // Blockchain specific contextual infos
  1356  }
  1357  
  1358  // FilterMigrateBinsUpStack is a free log retrieval operation binding the contract event 0x6deceb91de75f84acd021df8c6410377aa442257495a79a9e3bfc7eba745853e.
  1359  //
  1360  // Solidity: event MigrateBinsUpStack(address indexed sender, uint128 binId, uint32 maxRecursion)
  1361  func (_Pool *PoolFilterer) FilterMigrateBinsUpStack(opts *bind.FilterOpts, sender []common.Address) (*PoolMigrateBinsUpStackIterator, error) {
  1362  
  1363  	var senderRule []interface{}
  1364  	for _, senderItem := range sender {
  1365  		senderRule = append(senderRule, senderItem)
  1366  	}
  1367  
  1368  	logs, sub, err := _Pool.contract.FilterLogs(opts, "MigrateBinsUpStack", senderRule)
  1369  	if err != nil {
  1370  		return nil, err
  1371  	}
  1372  	return &PoolMigrateBinsUpStackIterator{contract: _Pool.contract, event: "MigrateBinsUpStack", logs: logs, sub: sub}, nil
  1373  }
  1374  
  1375  // WatchMigrateBinsUpStack is a free log subscription operation binding the contract event 0x6deceb91de75f84acd021df8c6410377aa442257495a79a9e3bfc7eba745853e.
  1376  //
  1377  // Solidity: event MigrateBinsUpStack(address indexed sender, uint128 binId, uint32 maxRecursion)
  1378  func (_Pool *PoolFilterer) WatchMigrateBinsUpStack(opts *bind.WatchOpts, sink chan<- *PoolMigrateBinsUpStack, sender []common.Address) (event.Subscription, error) {
  1379  
  1380  	var senderRule []interface{}
  1381  	for _, senderItem := range sender {
  1382  		senderRule = append(senderRule, senderItem)
  1383  	}
  1384  
  1385  	logs, sub, err := _Pool.contract.WatchLogs(opts, "MigrateBinsUpStack", senderRule)
  1386  	if err != nil {
  1387  		return nil, err
  1388  	}
  1389  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1390  		defer sub.Unsubscribe()
  1391  		for {
  1392  			select {
  1393  			case log := <-logs:
  1394  				// New log arrived, parse the event and forward to the user
  1395  				event := new(PoolMigrateBinsUpStack)
  1396  				if err := _Pool.contract.UnpackLog(event, "MigrateBinsUpStack", log); err != nil {
  1397  					return err
  1398  				}
  1399  				event.Raw = log
  1400  
  1401  				select {
  1402  				case sink <- event:
  1403  				case err := <-sub.Err():
  1404  					return err
  1405  				case <-quit:
  1406  					return nil
  1407  				}
  1408  			case err := <-sub.Err():
  1409  				return err
  1410  			case <-quit:
  1411  				return nil
  1412  			}
  1413  		}
  1414  	}), nil
  1415  }
  1416  
  1417  // ParseMigrateBinsUpStack is a log parse operation binding the contract event 0x6deceb91de75f84acd021df8c6410377aa442257495a79a9e3bfc7eba745853e.
  1418  //
  1419  // Solidity: event MigrateBinsUpStack(address indexed sender, uint128 binId, uint32 maxRecursion)
  1420  func (_Pool *PoolFilterer) ParseMigrateBinsUpStack(log types.Log) (*PoolMigrateBinsUpStack, error) {
  1421  	event := new(PoolMigrateBinsUpStack)
  1422  	if err := _Pool.contract.UnpackLog(event, "MigrateBinsUpStack", log); err != nil {
  1423  		return nil, err
  1424  	}
  1425  	event.Raw = log
  1426  	return event, nil
  1427  }
  1428  
  1429  // PoolProtocolFeeCollectedIterator is returned from FilterProtocolFeeCollected and is used to iterate over the raw logs and unpacked data for ProtocolFeeCollected events raised by the Pool contract.
  1430  type PoolProtocolFeeCollectedIterator struct {
  1431  	Event *PoolProtocolFeeCollected // Event containing the contract specifics and raw log
  1432  
  1433  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1434  	event    string              // Event name to use for unpacking event data
  1435  
  1436  	logs chan types.Log        // Log channel receiving the found contract events
  1437  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1438  	done bool                  // Whether the subscription completed delivering logs
  1439  	fail error                 // Occurred error to stop iteration
  1440  }
  1441  
  1442  // Next advances the iterator to the subsequent event, returning whether there
  1443  // are any more events found. In case of a retrieval or parsing error, false is
  1444  // returned and Error() can be queried for the exact failure.
  1445  func (it *PoolProtocolFeeCollectedIterator) Next() bool {
  1446  	// If the iterator failed, stop iterating
  1447  	if it.fail != nil {
  1448  		return false
  1449  	}
  1450  	// If the iterator completed, deliver directly whatever's available
  1451  	if it.done {
  1452  		select {
  1453  		case log := <-it.logs:
  1454  			it.Event = new(PoolProtocolFeeCollected)
  1455  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1456  				it.fail = err
  1457  				return false
  1458  			}
  1459  			it.Event.Raw = log
  1460  			return true
  1461  
  1462  		default:
  1463  			return false
  1464  		}
  1465  	}
  1466  	// Iterator still in progress, wait for either a data or an error event
  1467  	select {
  1468  	case log := <-it.logs:
  1469  		it.Event = new(PoolProtocolFeeCollected)
  1470  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1471  			it.fail = err
  1472  			return false
  1473  		}
  1474  		it.Event.Raw = log
  1475  		return true
  1476  
  1477  	case err := <-it.sub.Err():
  1478  		it.done = true
  1479  		it.fail = err
  1480  		return it.Next()
  1481  	}
  1482  }
  1483  
  1484  // Error returns any retrieval or parsing error occurred during filtering.
  1485  func (it *PoolProtocolFeeCollectedIterator) Error() error {
  1486  	return it.fail
  1487  }
  1488  
  1489  // Close terminates the iteration process, releasing any pending underlying
  1490  // resources.
  1491  func (it *PoolProtocolFeeCollectedIterator) Close() error {
  1492  	it.sub.Unsubscribe()
  1493  	return nil
  1494  }
  1495  
  1496  // PoolProtocolFeeCollected represents a ProtocolFeeCollected event raised by the Pool contract.
  1497  type PoolProtocolFeeCollected struct {
  1498  	ProtocolFee *big.Int
  1499  	IsTokenA    bool
  1500  	Raw         types.Log // Blockchain specific contextual infos
  1501  }
  1502  
  1503  // FilterProtocolFeeCollected is a free log retrieval operation binding the contract event 0x292394e5b7a6b75d01122bb2dc85341cefec10b852325db9d3658a452f5eb211.
  1504  //
  1505  // Solidity: event ProtocolFeeCollected(uint256 protocolFee, bool isTokenA)
  1506  func (_Pool *PoolFilterer) FilterProtocolFeeCollected(opts *bind.FilterOpts) (*PoolProtocolFeeCollectedIterator, error) {
  1507  
  1508  	logs, sub, err := _Pool.contract.FilterLogs(opts, "ProtocolFeeCollected")
  1509  	if err != nil {
  1510  		return nil, err
  1511  	}
  1512  	return &PoolProtocolFeeCollectedIterator{contract: _Pool.contract, event: "ProtocolFeeCollected", logs: logs, sub: sub}, nil
  1513  }
  1514  
  1515  // WatchProtocolFeeCollected is a free log subscription operation binding the contract event 0x292394e5b7a6b75d01122bb2dc85341cefec10b852325db9d3658a452f5eb211.
  1516  //
  1517  // Solidity: event ProtocolFeeCollected(uint256 protocolFee, bool isTokenA)
  1518  func (_Pool *PoolFilterer) WatchProtocolFeeCollected(opts *bind.WatchOpts, sink chan<- *PoolProtocolFeeCollected) (event.Subscription, error) {
  1519  
  1520  	logs, sub, err := _Pool.contract.WatchLogs(opts, "ProtocolFeeCollected")
  1521  	if err != nil {
  1522  		return nil, err
  1523  	}
  1524  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1525  		defer sub.Unsubscribe()
  1526  		for {
  1527  			select {
  1528  			case log := <-logs:
  1529  				// New log arrived, parse the event and forward to the user
  1530  				event := new(PoolProtocolFeeCollected)
  1531  				if err := _Pool.contract.UnpackLog(event, "ProtocolFeeCollected", log); err != nil {
  1532  					return err
  1533  				}
  1534  				event.Raw = log
  1535  
  1536  				select {
  1537  				case sink <- event:
  1538  				case err := <-sub.Err():
  1539  					return err
  1540  				case <-quit:
  1541  					return nil
  1542  				}
  1543  			case err := <-sub.Err():
  1544  				return err
  1545  			case <-quit:
  1546  				return nil
  1547  			}
  1548  		}
  1549  	}), nil
  1550  }
  1551  
  1552  // ParseProtocolFeeCollected is a log parse operation binding the contract event 0x292394e5b7a6b75d01122bb2dc85341cefec10b852325db9d3658a452f5eb211.
  1553  //
  1554  // Solidity: event ProtocolFeeCollected(uint256 protocolFee, bool isTokenA)
  1555  func (_Pool *PoolFilterer) ParseProtocolFeeCollected(log types.Log) (*PoolProtocolFeeCollected, error) {
  1556  	event := new(PoolProtocolFeeCollected)
  1557  	if err := _Pool.contract.UnpackLog(event, "ProtocolFeeCollected", log); err != nil {
  1558  		return nil, err
  1559  	}
  1560  	event.Raw = log
  1561  	return event, nil
  1562  }
  1563  
  1564  // PoolRemoveLiquidityIterator is returned from FilterRemoveLiquidity and is used to iterate over the raw logs and unpacked data for RemoveLiquidity events raised by the Pool contract.
  1565  type PoolRemoveLiquidityIterator struct {
  1566  	Event *PoolRemoveLiquidity // Event containing the contract specifics and raw log
  1567  
  1568  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1569  	event    string              // Event name to use for unpacking event data
  1570  
  1571  	logs chan types.Log        // Log channel receiving the found contract events
  1572  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1573  	done bool                  // Whether the subscription completed delivering logs
  1574  	fail error                 // Occurred error to stop iteration
  1575  }
  1576  
  1577  // Next advances the iterator to the subsequent event, returning whether there
  1578  // are any more events found. In case of a retrieval or parsing error, false is
  1579  // returned and Error() can be queried for the exact failure.
  1580  func (it *PoolRemoveLiquidityIterator) Next() bool {
  1581  	// If the iterator failed, stop iterating
  1582  	if it.fail != nil {
  1583  		return false
  1584  	}
  1585  	// If the iterator completed, deliver directly whatever's available
  1586  	if it.done {
  1587  		select {
  1588  		case log := <-it.logs:
  1589  			it.Event = new(PoolRemoveLiquidity)
  1590  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1591  				it.fail = err
  1592  				return false
  1593  			}
  1594  			it.Event.Raw = log
  1595  			return true
  1596  
  1597  		default:
  1598  			return false
  1599  		}
  1600  	}
  1601  	// Iterator still in progress, wait for either a data or an error event
  1602  	select {
  1603  	case log := <-it.logs:
  1604  		it.Event = new(PoolRemoveLiquidity)
  1605  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1606  			it.fail = err
  1607  			return false
  1608  		}
  1609  		it.Event.Raw = log
  1610  		return true
  1611  
  1612  	case err := <-it.sub.Err():
  1613  		it.done = true
  1614  		it.fail = err
  1615  		return it.Next()
  1616  	}
  1617  }
  1618  
  1619  // Error returns any retrieval or parsing error occurred during filtering.
  1620  func (it *PoolRemoveLiquidityIterator) Error() error {
  1621  	return it.fail
  1622  }
  1623  
  1624  // Close terminates the iteration process, releasing any pending underlying
  1625  // resources.
  1626  func (it *PoolRemoveLiquidityIterator) Close() error {
  1627  	it.sub.Unsubscribe()
  1628  	return nil
  1629  }
  1630  
  1631  // PoolRemoveLiquidity represents a RemoveLiquidity event raised by the Pool contract.
  1632  type PoolRemoveLiquidity struct {
  1633  	Sender    common.Address
  1634  	Recipient common.Address
  1635  	TokenId   *big.Int
  1636  	BinDeltas []IPoolBinDelta
  1637  	Raw       types.Log // Blockchain specific contextual infos
  1638  }
  1639  
  1640  // FilterRemoveLiquidity is a free log retrieval operation binding the contract event 0x65da280c1e973a1c5884c38d63e2c2b3c2a3158a0761e76545b64035e2489dfe.
  1641  //
  1642  // Solidity: event RemoveLiquidity(address indexed sender, address indexed recipient, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
  1643  func (_Pool *PoolFilterer) FilterRemoveLiquidity(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address, tokenId []*big.Int) (*PoolRemoveLiquidityIterator, error) {
  1644  
  1645  	var senderRule []interface{}
  1646  	for _, senderItem := range sender {
  1647  		senderRule = append(senderRule, senderItem)
  1648  	}
  1649  	var recipientRule []interface{}
  1650  	for _, recipientItem := range recipient {
  1651  		recipientRule = append(recipientRule, recipientItem)
  1652  	}
  1653  	var tokenIdRule []interface{}
  1654  	for _, tokenIdItem := range tokenId {
  1655  		tokenIdRule = append(tokenIdRule, tokenIdItem)
  1656  	}
  1657  
  1658  	logs, sub, err := _Pool.contract.FilterLogs(opts, "RemoveLiquidity", senderRule, recipientRule, tokenIdRule)
  1659  	if err != nil {
  1660  		return nil, err
  1661  	}
  1662  	return &PoolRemoveLiquidityIterator{contract: _Pool.contract, event: "RemoveLiquidity", logs: logs, sub: sub}, nil
  1663  }
  1664  
  1665  // WatchRemoveLiquidity is a free log subscription operation binding the contract event 0x65da280c1e973a1c5884c38d63e2c2b3c2a3158a0761e76545b64035e2489dfe.
  1666  //
  1667  // Solidity: event RemoveLiquidity(address indexed sender, address indexed recipient, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
  1668  func (_Pool *PoolFilterer) WatchRemoveLiquidity(opts *bind.WatchOpts, sink chan<- *PoolRemoveLiquidity, sender []common.Address, recipient []common.Address, tokenId []*big.Int) (event.Subscription, error) {
  1669  
  1670  	var senderRule []interface{}
  1671  	for _, senderItem := range sender {
  1672  		senderRule = append(senderRule, senderItem)
  1673  	}
  1674  	var recipientRule []interface{}
  1675  	for _, recipientItem := range recipient {
  1676  		recipientRule = append(recipientRule, recipientItem)
  1677  	}
  1678  	var tokenIdRule []interface{}
  1679  	for _, tokenIdItem := range tokenId {
  1680  		tokenIdRule = append(tokenIdRule, tokenIdItem)
  1681  	}
  1682  
  1683  	logs, sub, err := _Pool.contract.WatchLogs(opts, "RemoveLiquidity", senderRule, recipientRule, tokenIdRule)
  1684  	if err != nil {
  1685  		return nil, err
  1686  	}
  1687  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1688  		defer sub.Unsubscribe()
  1689  		for {
  1690  			select {
  1691  			case log := <-logs:
  1692  				// New log arrived, parse the event and forward to the user
  1693  				event := new(PoolRemoveLiquidity)
  1694  				if err := _Pool.contract.UnpackLog(event, "RemoveLiquidity", log); err != nil {
  1695  					return err
  1696  				}
  1697  				event.Raw = log
  1698  
  1699  				select {
  1700  				case sink <- event:
  1701  				case err := <-sub.Err():
  1702  					return err
  1703  				case <-quit:
  1704  					return nil
  1705  				}
  1706  			case err := <-sub.Err():
  1707  				return err
  1708  			case <-quit:
  1709  				return nil
  1710  			}
  1711  		}
  1712  	}), nil
  1713  }
  1714  
  1715  // ParseRemoveLiquidity is a log parse operation binding the contract event 0x65da280c1e973a1c5884c38d63e2c2b3c2a3158a0761e76545b64035e2489dfe.
  1716  //
  1717  // Solidity: event RemoveLiquidity(address indexed sender, address indexed recipient, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)
  1718  func (_Pool *PoolFilterer) ParseRemoveLiquidity(log types.Log) (*PoolRemoveLiquidity, error) {
  1719  	event := new(PoolRemoveLiquidity)
  1720  	if err := _Pool.contract.UnpackLog(event, "RemoveLiquidity", log); err != nil {
  1721  		return nil, err
  1722  	}
  1723  	event.Raw = log
  1724  	return event, nil
  1725  }
  1726  
  1727  // PoolSetProtocolFeeRatioIterator is returned from FilterSetProtocolFeeRatio and is used to iterate over the raw logs and unpacked data for SetProtocolFeeRatio events raised by the Pool contract.
  1728  type PoolSetProtocolFeeRatioIterator struct {
  1729  	Event *PoolSetProtocolFeeRatio // Event containing the contract specifics and raw log
  1730  
  1731  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1732  	event    string              // Event name to use for unpacking event data
  1733  
  1734  	logs chan types.Log        // Log channel receiving the found contract events
  1735  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1736  	done bool                  // Whether the subscription completed delivering logs
  1737  	fail error                 // Occurred error to stop iteration
  1738  }
  1739  
  1740  // Next advances the iterator to the subsequent event, returning whether there
  1741  // are any more events found. In case of a retrieval or parsing error, false is
  1742  // returned and Error() can be queried for the exact failure.
  1743  func (it *PoolSetProtocolFeeRatioIterator) Next() bool {
  1744  	// If the iterator failed, stop iterating
  1745  	if it.fail != nil {
  1746  		return false
  1747  	}
  1748  	// If the iterator completed, deliver directly whatever's available
  1749  	if it.done {
  1750  		select {
  1751  		case log := <-it.logs:
  1752  			it.Event = new(PoolSetProtocolFeeRatio)
  1753  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1754  				it.fail = err
  1755  				return false
  1756  			}
  1757  			it.Event.Raw = log
  1758  			return true
  1759  
  1760  		default:
  1761  			return false
  1762  		}
  1763  	}
  1764  	// Iterator still in progress, wait for either a data or an error event
  1765  	select {
  1766  	case log := <-it.logs:
  1767  		it.Event = new(PoolSetProtocolFeeRatio)
  1768  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1769  			it.fail = err
  1770  			return false
  1771  		}
  1772  		it.Event.Raw = log
  1773  		return true
  1774  
  1775  	case err := <-it.sub.Err():
  1776  		it.done = true
  1777  		it.fail = err
  1778  		return it.Next()
  1779  	}
  1780  }
  1781  
  1782  // Error returns any retrieval or parsing error occurred during filtering.
  1783  func (it *PoolSetProtocolFeeRatioIterator) Error() error {
  1784  	return it.fail
  1785  }
  1786  
  1787  // Close terminates the iteration process, releasing any pending underlying
  1788  // resources.
  1789  func (it *PoolSetProtocolFeeRatioIterator) Close() error {
  1790  	it.sub.Unsubscribe()
  1791  	return nil
  1792  }
  1793  
  1794  // PoolSetProtocolFeeRatio represents a SetProtocolFeeRatio event raised by the Pool contract.
  1795  type PoolSetProtocolFeeRatio struct {
  1796  	ProtocolFee *big.Int
  1797  	Raw         types.Log // Blockchain specific contextual infos
  1798  }
  1799  
  1800  // FilterSetProtocolFeeRatio is a free log retrieval operation binding the contract event 0x06e6ba2b10970ecae3ab2c29feb60ab2503358820756ef14a9827b0fa5add30f.
  1801  //
  1802  // Solidity: event SetProtocolFeeRatio(uint256 protocolFee)
  1803  func (_Pool *PoolFilterer) FilterSetProtocolFeeRatio(opts *bind.FilterOpts) (*PoolSetProtocolFeeRatioIterator, error) {
  1804  
  1805  	logs, sub, err := _Pool.contract.FilterLogs(opts, "SetProtocolFeeRatio")
  1806  	if err != nil {
  1807  		return nil, err
  1808  	}
  1809  	return &PoolSetProtocolFeeRatioIterator{contract: _Pool.contract, event: "SetProtocolFeeRatio", logs: logs, sub: sub}, nil
  1810  }
  1811  
  1812  // WatchSetProtocolFeeRatio is a free log subscription operation binding the contract event 0x06e6ba2b10970ecae3ab2c29feb60ab2503358820756ef14a9827b0fa5add30f.
  1813  //
  1814  // Solidity: event SetProtocolFeeRatio(uint256 protocolFee)
  1815  func (_Pool *PoolFilterer) WatchSetProtocolFeeRatio(opts *bind.WatchOpts, sink chan<- *PoolSetProtocolFeeRatio) (event.Subscription, error) {
  1816  
  1817  	logs, sub, err := _Pool.contract.WatchLogs(opts, "SetProtocolFeeRatio")
  1818  	if err != nil {
  1819  		return nil, err
  1820  	}
  1821  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1822  		defer sub.Unsubscribe()
  1823  		for {
  1824  			select {
  1825  			case log := <-logs:
  1826  				// New log arrived, parse the event and forward to the user
  1827  				event := new(PoolSetProtocolFeeRatio)
  1828  				if err := _Pool.contract.UnpackLog(event, "SetProtocolFeeRatio", log); err != nil {
  1829  					return err
  1830  				}
  1831  				event.Raw = log
  1832  
  1833  				select {
  1834  				case sink <- event:
  1835  				case err := <-sub.Err():
  1836  					return err
  1837  				case <-quit:
  1838  					return nil
  1839  				}
  1840  			case err := <-sub.Err():
  1841  				return err
  1842  			case <-quit:
  1843  				return nil
  1844  			}
  1845  		}
  1846  	}), nil
  1847  }
  1848  
  1849  // ParseSetProtocolFeeRatio is a log parse operation binding the contract event 0x06e6ba2b10970ecae3ab2c29feb60ab2503358820756ef14a9827b0fa5add30f.
  1850  //
  1851  // Solidity: event SetProtocolFeeRatio(uint256 protocolFee)
  1852  func (_Pool *PoolFilterer) ParseSetProtocolFeeRatio(log types.Log) (*PoolSetProtocolFeeRatio, error) {
  1853  	event := new(PoolSetProtocolFeeRatio)
  1854  	if err := _Pool.contract.UnpackLog(event, "SetProtocolFeeRatio", log); err != nil {
  1855  		return nil, err
  1856  	}
  1857  	event.Raw = log
  1858  	return event, nil
  1859  }
  1860  
  1861  // 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.
  1862  type PoolSwapIterator struct {
  1863  	Event *PoolSwap // Event containing the contract specifics and raw log
  1864  
  1865  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1866  	event    string              // Event name to use for unpacking event data
  1867  
  1868  	logs chan types.Log        // Log channel receiving the found contract events
  1869  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1870  	done bool                  // Whether the subscription completed delivering logs
  1871  	fail error                 // Occurred error to stop iteration
  1872  }
  1873  
  1874  // Next advances the iterator to the subsequent event, returning whether there
  1875  // are any more events found. In case of a retrieval or parsing error, false is
  1876  // returned and Error() can be queried for the exact failure.
  1877  func (it *PoolSwapIterator) Next() bool {
  1878  	// If the iterator failed, stop iterating
  1879  	if it.fail != nil {
  1880  		return false
  1881  	}
  1882  	// If the iterator completed, deliver directly whatever's available
  1883  	if it.done {
  1884  		select {
  1885  		case log := <-it.logs:
  1886  			it.Event = new(PoolSwap)
  1887  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1888  				it.fail = err
  1889  				return false
  1890  			}
  1891  			it.Event.Raw = log
  1892  			return true
  1893  
  1894  		default:
  1895  			return false
  1896  		}
  1897  	}
  1898  	// Iterator still in progress, wait for either a data or an error event
  1899  	select {
  1900  	case log := <-it.logs:
  1901  		it.Event = new(PoolSwap)
  1902  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1903  			it.fail = err
  1904  			return false
  1905  		}
  1906  		it.Event.Raw = log
  1907  		return true
  1908  
  1909  	case err := <-it.sub.Err():
  1910  		it.done = true
  1911  		it.fail = err
  1912  		return it.Next()
  1913  	}
  1914  }
  1915  
  1916  // Error returns any retrieval or parsing error occurred during filtering.
  1917  func (it *PoolSwapIterator) Error() error {
  1918  	return it.fail
  1919  }
  1920  
  1921  // Close terminates the iteration process, releasing any pending underlying
  1922  // resources.
  1923  func (it *PoolSwapIterator) Close() error {
  1924  	it.sub.Unsubscribe()
  1925  	return nil
  1926  }
  1927  
  1928  // PoolSwap represents a Swap event raised by the Pool contract.
  1929  type PoolSwap struct {
  1930  	Sender      common.Address
  1931  	Recipient   common.Address
  1932  	TokenAIn    bool
  1933  	ExactOutput bool
  1934  	AmountIn    *big.Int
  1935  	AmountOut   *big.Int
  1936  	ActiveTick  int32
  1937  	Raw         types.Log // Blockchain specific contextual infos
  1938  }
  1939  
  1940  // FilterSwap is a free log retrieval operation binding the contract event 0x3b841dc9ab51e3104bda4f61b41e4271192d22cd19da5ee6e292dc8e2744f713.
  1941  //
  1942  // Solidity: event Swap(address sender, address recipient, bool tokenAIn, bool exactOutput, uint256 amountIn, uint256 amountOut, int32 activeTick)
  1943  func (_Pool *PoolFilterer) FilterSwap(opts *bind.FilterOpts) (*PoolSwapIterator, error) {
  1944  
  1945  	logs, sub, err := _Pool.contract.FilterLogs(opts, "Swap")
  1946  	if err != nil {
  1947  		return nil, err
  1948  	}
  1949  	return &PoolSwapIterator{contract: _Pool.contract, event: "Swap", logs: logs, sub: sub}, nil
  1950  }
  1951  
  1952  // WatchSwap is a free log subscription operation binding the contract event 0x3b841dc9ab51e3104bda4f61b41e4271192d22cd19da5ee6e292dc8e2744f713.
  1953  //
  1954  // Solidity: event Swap(address sender, address recipient, bool tokenAIn, bool exactOutput, uint256 amountIn, uint256 amountOut, int32 activeTick)
  1955  func (_Pool *PoolFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *PoolSwap) (event.Subscription, error) {
  1956  
  1957  	logs, sub, err := _Pool.contract.WatchLogs(opts, "Swap")
  1958  	if err != nil {
  1959  		return nil, err
  1960  	}
  1961  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1962  		defer sub.Unsubscribe()
  1963  		for {
  1964  			select {
  1965  			case log := <-logs:
  1966  				// New log arrived, parse the event and forward to the user
  1967  				event := new(PoolSwap)
  1968  				if err := _Pool.contract.UnpackLog(event, "Swap", log); err != nil {
  1969  					return err
  1970  				}
  1971  				event.Raw = log
  1972  
  1973  				select {
  1974  				case sink <- event:
  1975  				case err := <-sub.Err():
  1976  					return err
  1977  				case <-quit:
  1978  					return nil
  1979  				}
  1980  			case err := <-sub.Err():
  1981  				return err
  1982  			case <-quit:
  1983  				return nil
  1984  			}
  1985  		}
  1986  	}), nil
  1987  }
  1988  
  1989  // ParseSwap is a log parse operation binding the contract event 0x3b841dc9ab51e3104bda4f61b41e4271192d22cd19da5ee6e292dc8e2744f713.
  1990  //
  1991  // Solidity: event Swap(address sender, address recipient, bool tokenAIn, bool exactOutput, uint256 amountIn, uint256 amountOut, int32 activeTick)
  1992  func (_Pool *PoolFilterer) ParseSwap(log types.Log) (*PoolSwap, error) {
  1993  	event := new(PoolSwap)
  1994  	if err := _Pool.contract.UnpackLog(event, "Swap", log); err != nil {
  1995  		return nil, err
  1996  	}
  1997  	event.Raw = log
  1998  	return event, nil
  1999  }
  2000  
  2001  // PoolTransferLiquidityIterator is returned from FilterTransferLiquidity and is used to iterate over the raw logs and unpacked data for TransferLiquidity events raised by the Pool contract.
  2002  type PoolTransferLiquidityIterator struct {
  2003  	Event *PoolTransferLiquidity // Event containing the contract specifics and raw log
  2004  
  2005  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2006  	event    string              // Event name to use for unpacking event data
  2007  
  2008  	logs chan types.Log        // Log channel receiving the found contract events
  2009  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2010  	done bool                  // Whether the subscription completed delivering logs
  2011  	fail error                 // Occurred error to stop iteration
  2012  }
  2013  
  2014  // Next advances the iterator to the subsequent event, returning whether there
  2015  // are any more events found. In case of a retrieval or parsing error, false is
  2016  // returned and Error() can be queried for the exact failure.
  2017  func (it *PoolTransferLiquidityIterator) Next() bool {
  2018  	// If the iterator failed, stop iterating
  2019  	if it.fail != nil {
  2020  		return false
  2021  	}
  2022  	// If the iterator completed, deliver directly whatever's available
  2023  	if it.done {
  2024  		select {
  2025  		case log := <-it.logs:
  2026  			it.Event = new(PoolTransferLiquidity)
  2027  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2028  				it.fail = err
  2029  				return false
  2030  			}
  2031  			it.Event.Raw = log
  2032  			return true
  2033  
  2034  		default:
  2035  			return false
  2036  		}
  2037  	}
  2038  	// Iterator still in progress, wait for either a data or an error event
  2039  	select {
  2040  	case log := <-it.logs:
  2041  		it.Event = new(PoolTransferLiquidity)
  2042  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2043  			it.fail = err
  2044  			return false
  2045  		}
  2046  		it.Event.Raw = log
  2047  		return true
  2048  
  2049  	case err := <-it.sub.Err():
  2050  		it.done = true
  2051  		it.fail = err
  2052  		return it.Next()
  2053  	}
  2054  }
  2055  
  2056  // Error returns any retrieval or parsing error occurred during filtering.
  2057  func (it *PoolTransferLiquidityIterator) Error() error {
  2058  	return it.fail
  2059  }
  2060  
  2061  // Close terminates the iteration process, releasing any pending underlying
  2062  // resources.
  2063  func (it *PoolTransferLiquidityIterator) Close() error {
  2064  	it.sub.Unsubscribe()
  2065  	return nil
  2066  }
  2067  
  2068  // PoolTransferLiquidity represents a TransferLiquidity event raised by the Pool contract.
  2069  type PoolTransferLiquidity struct {
  2070  	FromTokenId *big.Int
  2071  	ToTokenId   *big.Int
  2072  	Params      []IPoolRemoveLiquidityParams
  2073  	Raw         types.Log // Blockchain specific contextual infos
  2074  }
  2075  
  2076  // FilterTransferLiquidity is a free log retrieval operation binding the contract event 0xd384edefdfebd0bb45d82f94aed5ff327fd6510cc6c53ddc78a3ef4a0e7c715c.
  2077  //
  2078  // Solidity: event TransferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params)
  2079  func (_Pool *PoolFilterer) FilterTransferLiquidity(opts *bind.FilterOpts) (*PoolTransferLiquidityIterator, error) {
  2080  
  2081  	logs, sub, err := _Pool.contract.FilterLogs(opts, "TransferLiquidity")
  2082  	if err != nil {
  2083  		return nil, err
  2084  	}
  2085  	return &PoolTransferLiquidityIterator{contract: _Pool.contract, event: "TransferLiquidity", logs: logs, sub: sub}, nil
  2086  }
  2087  
  2088  // WatchTransferLiquidity is a free log subscription operation binding the contract event 0xd384edefdfebd0bb45d82f94aed5ff327fd6510cc6c53ddc78a3ef4a0e7c715c.
  2089  //
  2090  // Solidity: event TransferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params)
  2091  func (_Pool *PoolFilterer) WatchTransferLiquidity(opts *bind.WatchOpts, sink chan<- *PoolTransferLiquidity) (event.Subscription, error) {
  2092  
  2093  	logs, sub, err := _Pool.contract.WatchLogs(opts, "TransferLiquidity")
  2094  	if err != nil {
  2095  		return nil, err
  2096  	}
  2097  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2098  		defer sub.Unsubscribe()
  2099  		for {
  2100  			select {
  2101  			case log := <-logs:
  2102  				// New log arrived, parse the event and forward to the user
  2103  				event := new(PoolTransferLiquidity)
  2104  				if err := _Pool.contract.UnpackLog(event, "TransferLiquidity", log); err != nil {
  2105  					return err
  2106  				}
  2107  				event.Raw = log
  2108  
  2109  				select {
  2110  				case sink <- event:
  2111  				case err := <-sub.Err():
  2112  					return err
  2113  				case <-quit:
  2114  					return nil
  2115  				}
  2116  			case err := <-sub.Err():
  2117  				return err
  2118  			case <-quit:
  2119  				return nil
  2120  			}
  2121  		}
  2122  	}), nil
  2123  }
  2124  
  2125  // ParseTransferLiquidity is a log parse operation binding the contract event 0xd384edefdfebd0bb45d82f94aed5ff327fd6510cc6c53ddc78a3ef4a0e7c715c.
  2126  //
  2127  // Solidity: event TransferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params)
  2128  func (_Pool *PoolFilterer) ParseTransferLiquidity(log types.Log) (*PoolTransferLiquidity, error) {
  2129  	event := new(PoolTransferLiquidity)
  2130  	if err := _Pool.contract.UnpackLog(event, "TransferLiquidity", log); err != nil {
  2131  		return nil, err
  2132  	}
  2133  	event.Raw = log
  2134  	return event, nil
  2135  }