github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/exchange-scrapers/uniswapv3/uniswapV3Pair/UniswapV3Pair.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 UniswapV3Pair
     5  
     6  import (
     7  	"math/big"
     8  	"strings"
     9  
    10  	ethereum "github.com/ethereum/go-ethereum"
    11  	"github.com/ethereum/go-ethereum/accounts/abi"
    12  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    13  	"github.com/ethereum/go-ethereum/common"
    14  	"github.com/ethereum/go-ethereum/core/types"
    15  	"github.com/ethereum/go-ethereum/event"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var (
    20  	_ = big.NewInt
    21  	_ = strings.NewReader
    22  	_ = ethereum.NotFound
    23  	_ = bind.Bind
    24  	_ = common.Big1
    25  	_ = types.BloomLookup
    26  	_ = event.NewSubscription
    27  )
    28  
    29  // UniswapV3PairABI is the input ABI used to generate the binding from.
    30  const UniswapV3PairABI = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"name\":\"Collect\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"name\":\"CollectProtocol\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid1\",\"type\":\"uint256\"}],\"name\":\"Flash\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"observationCardinalityNextOld\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"observationCardinalityNextNew\",\"type\":\"uint16\"}],\"name\":\"IncreaseObservationCardinalityNext\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"Initialize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"indexed\":true,\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol0Old\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol1Old\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol0New\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"feeProtocol1New\",\"type\":\"uint8\"}],\"name\":\"SetFeeProtocol\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidity\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount0Requested\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1Requested\",\"type\":\"uint128\"}],\"name\":\"collect\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount0Requested\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1Requested\",\"type\":\"uint128\"}],\"name\":\"collectProtocol\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount1\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeGrowthGlobal0X128\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeGrowthGlobal1X128\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"flash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"observationCardinalityNext\",\"type\":\"uint16\"}],\"name\":\"increaseObservationCardinalityNext\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidity\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLiquidityPerTick\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"observations\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"blockTimestamp\",\"type\":\"uint32\"},{\"internalType\":\"int56\",\"name\":\"tickCumulative\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityCumulativeX128\",\"type\":\"uint160\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"secondsAgos\",\"type\":\"uint32[]\"}],\"name\":\"observe\",\"outputs\":[{\"internalType\":\"int56[]\",\"name\":\"tickCumulatives\",\"type\":\"int56[]\"},{\"internalType\":\"uint160[]\",\"name\":\"secondsPerLiquidityCumulativeX128s\",\"type\":\"uint160[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"positions\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"liquidity\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthInside0LastX128\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthInside1LastX128\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"tokensOwed0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"tokensOwed1\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFees\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"token0\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"token1\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"feeProtocol0\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"feeProtocol1\",\"type\":\"uint8\"}],\"name\":\"setFeeProtocol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slot0\",\"outputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtPriceX96\",\"type\":\"uint160\"},{\"internalType\":\"int24\",\"name\":\"tick\",\"type\":\"int24\"},{\"internalType\":\"uint16\",\"name\":\"observationIndex\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"observationCardinality\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"observationCardinalityNext\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"feeProtocol\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"unlocked\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"tickLower\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"tickUpper\",\"type\":\"int24\"}],\"name\":\"snapshotCumulativesInside\",\"outputs\":[{\"internalType\":\"int56\",\"name\":\"tickCumulativeInside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityInsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsInside\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"int256\",\"name\":\"amountSpecified\",\"type\":\"int256\"},{\"internalType\":\"uint160\",\"name\":\"sqrtPriceLimitX96\",\"type\":\"uint160\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"amount0\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int16\",\"name\":\"\",\"type\":\"int16\"}],\"name\":\"tickBitmap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tickSpacing\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"name\":\"ticks\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"liquidityGross\",\"type\":\"uint128\"},{\"internalType\":\"int128\",\"name\":\"liquidityNet\",\"type\":\"int128\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthOutside0X128\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeGrowthOutside1X128\",\"type\":\"uint256\"},{\"internalType\":\"int56\",\"name\":\"tickCumulativeOutside\",\"type\":\"int56\"},{\"internalType\":\"uint160\",\"name\":\"secondsPerLiquidityOutsideX128\",\"type\":\"uint160\"},{\"internalType\":\"uint32\",\"name\":\"secondsOutside\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
    31  
    32  // UniswapV3Pair is an auto generated Go binding around an Ethereum contract.
    33  type UniswapV3Pair struct {
    34  	UniswapV3PairCaller     // Read-only binding to the contract
    35  	UniswapV3PairTransactor // Write-only binding to the contract
    36  	UniswapV3PairFilterer   // Log filterer for contract events
    37  }
    38  
    39  // UniswapV3PairCaller is an auto generated read-only Go binding around an Ethereum contract.
    40  type UniswapV3PairCaller struct {
    41  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    42  }
    43  
    44  // UniswapV3PairTransactor is an auto generated write-only Go binding around an Ethereum contract.
    45  type UniswapV3PairTransactor struct {
    46  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    47  }
    48  
    49  // UniswapV3PairFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    50  type UniswapV3PairFilterer struct {
    51  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    52  }
    53  
    54  // UniswapV3PairSession is an auto generated Go binding around an Ethereum contract,
    55  // with pre-set call and transact options.
    56  type UniswapV3PairSession struct {
    57  	Contract     *UniswapV3Pair    // Generic contract binding to set the session for
    58  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    59  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    60  }
    61  
    62  // UniswapV3PairCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    63  // with pre-set call options.
    64  type UniswapV3PairCallerSession struct {
    65  	Contract *UniswapV3PairCaller // Generic contract caller binding to set the session for
    66  	CallOpts bind.CallOpts        // Call options to use throughout this session
    67  }
    68  
    69  // UniswapV3PairTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    70  // with pre-set transact options.
    71  type UniswapV3PairTransactorSession struct {
    72  	Contract     *UniswapV3PairTransactor // Generic contract transactor binding to set the session for
    73  	TransactOpts bind.TransactOpts        // Transaction auth options to use throughout this session
    74  }
    75  
    76  // UniswapV3PairRaw is an auto generated low-level Go binding around an Ethereum contract.
    77  type UniswapV3PairRaw struct {
    78  	Contract *UniswapV3Pair // Generic contract binding to access the raw methods on
    79  }
    80  
    81  // UniswapV3PairCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    82  type UniswapV3PairCallerRaw struct {
    83  	Contract *UniswapV3PairCaller // Generic read-only contract binding to access the raw methods on
    84  }
    85  
    86  // UniswapV3PairTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    87  type UniswapV3PairTransactorRaw struct {
    88  	Contract *UniswapV3PairTransactor // Generic write-only contract binding to access the raw methods on
    89  }
    90  
    91  // NewUniswapV3Pair creates a new instance of UniswapV3Pair, bound to a specific deployed contract.
    92  func NewUniswapV3Pair(address common.Address, backend bind.ContractBackend) (*UniswapV3Pair, error) {
    93  	contract, err := bindUniswapV3Pair(address, backend, backend, backend)
    94  	if err != nil {
    95  		return nil, err
    96  	}
    97  	return &UniswapV3Pair{UniswapV3PairCaller: UniswapV3PairCaller{contract: contract}, UniswapV3PairTransactor: UniswapV3PairTransactor{contract: contract}, UniswapV3PairFilterer: UniswapV3PairFilterer{contract: contract}}, nil
    98  }
    99  
   100  // NewUniswapV3PairCaller creates a new read-only instance of UniswapV3Pair, bound to a specific deployed contract.
   101  func NewUniswapV3PairCaller(address common.Address, caller bind.ContractCaller) (*UniswapV3PairCaller, error) {
   102  	contract, err := bindUniswapV3Pair(address, caller, nil, nil)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return &UniswapV3PairCaller{contract: contract}, nil
   107  }
   108  
   109  // NewUniswapV3PairTransactor creates a new write-only instance of UniswapV3Pair, bound to a specific deployed contract.
   110  func NewUniswapV3PairTransactor(address common.Address, transactor bind.ContractTransactor) (*UniswapV3PairTransactor, error) {
   111  	contract, err := bindUniswapV3Pair(address, nil, transactor, nil)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	return &UniswapV3PairTransactor{contract: contract}, nil
   116  }
   117  
   118  // NewUniswapV3PairFilterer creates a new log filterer instance of UniswapV3Pair, bound to a specific deployed contract.
   119  func NewUniswapV3PairFilterer(address common.Address, filterer bind.ContractFilterer) (*UniswapV3PairFilterer, error) {
   120  	contract, err := bindUniswapV3Pair(address, nil, nil, filterer)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	return &UniswapV3PairFilterer{contract: contract}, nil
   125  }
   126  
   127  // bindUniswapV3Pair binds a generic wrapper to an already deployed contract.
   128  func bindUniswapV3Pair(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   129  	parsed, err := abi.JSON(strings.NewReader(UniswapV3PairABI))
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   134  }
   135  
   136  // Call invokes the (constant) contract method with params as input values and
   137  // sets the output to result. The result type might be a single field for simple
   138  // returns, a slice of interfaces for anonymous returns and a struct for named
   139  // returns.
   140  func (_UniswapV3Pair *UniswapV3PairRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   141  	return _UniswapV3Pair.Contract.UniswapV3PairCaller.contract.Call(opts, result, method, params...)
   142  }
   143  
   144  // Transfer initiates a plain transaction to move funds to the contract, calling
   145  // its default method if one is available.
   146  func (_UniswapV3Pair *UniswapV3PairRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   147  	return _UniswapV3Pair.Contract.UniswapV3PairTransactor.contract.Transfer(opts)
   148  }
   149  
   150  // Transact invokes the (paid) contract method with params as input values.
   151  func (_UniswapV3Pair *UniswapV3PairRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   152  	return _UniswapV3Pair.Contract.UniswapV3PairTransactor.contract.Transact(opts, method, params...)
   153  }
   154  
   155  // Call invokes the (constant) contract method with params as input values and
   156  // sets the output to result. The result type might be a single field for simple
   157  // returns, a slice of interfaces for anonymous returns and a struct for named
   158  // returns.
   159  func (_UniswapV3Pair *UniswapV3PairCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   160  	return _UniswapV3Pair.Contract.contract.Call(opts, result, method, params...)
   161  }
   162  
   163  // Transfer initiates a plain transaction to move funds to the contract, calling
   164  // its default method if one is available.
   165  func (_UniswapV3Pair *UniswapV3PairTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   166  	return _UniswapV3Pair.Contract.contract.Transfer(opts)
   167  }
   168  
   169  // Transact invokes the (paid) contract method with params as input values.
   170  func (_UniswapV3Pair *UniswapV3PairTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   171  	return _UniswapV3Pair.Contract.contract.Transact(opts, method, params...)
   172  }
   173  
   174  // Factory is a free data retrieval call binding the contract method 0xc45a0155.
   175  //
   176  // Solidity: function factory() view returns(address)
   177  func (_UniswapV3Pair *UniswapV3PairCaller) Factory(opts *bind.CallOpts) (common.Address, error) {
   178  	var out []interface{}
   179  	err := _UniswapV3Pair.contract.Call(opts, &out, "factory")
   180  
   181  	if err != nil {
   182  		return *new(common.Address), err
   183  	}
   184  
   185  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   186  
   187  	return out0, err
   188  
   189  }
   190  
   191  // Factory is a free data retrieval call binding the contract method 0xc45a0155.
   192  //
   193  // Solidity: function factory() view returns(address)
   194  func (_UniswapV3Pair *UniswapV3PairSession) Factory() (common.Address, error) {
   195  	return _UniswapV3Pair.Contract.Factory(&_UniswapV3Pair.CallOpts)
   196  }
   197  
   198  // Factory is a free data retrieval call binding the contract method 0xc45a0155.
   199  //
   200  // Solidity: function factory() view returns(address)
   201  func (_UniswapV3Pair *UniswapV3PairCallerSession) Factory() (common.Address, error) {
   202  	return _UniswapV3Pair.Contract.Factory(&_UniswapV3Pair.CallOpts)
   203  }
   204  
   205  // Fee is a free data retrieval call binding the contract method 0xddca3f43.
   206  //
   207  // Solidity: function fee() view returns(uint24)
   208  func (_UniswapV3Pair *UniswapV3PairCaller) Fee(opts *bind.CallOpts) (*big.Int, error) {
   209  	var out []interface{}
   210  	err := _UniswapV3Pair.contract.Call(opts, &out, "fee")
   211  
   212  	if err != nil {
   213  		return *new(*big.Int), err
   214  	}
   215  
   216  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   217  
   218  	return out0, err
   219  
   220  }
   221  
   222  // Fee is a free data retrieval call binding the contract method 0xddca3f43.
   223  //
   224  // Solidity: function fee() view returns(uint24)
   225  func (_UniswapV3Pair *UniswapV3PairSession) Fee() (*big.Int, error) {
   226  	return _UniswapV3Pair.Contract.Fee(&_UniswapV3Pair.CallOpts)
   227  }
   228  
   229  // Fee is a free data retrieval call binding the contract method 0xddca3f43.
   230  //
   231  // Solidity: function fee() view returns(uint24)
   232  func (_UniswapV3Pair *UniswapV3PairCallerSession) Fee() (*big.Int, error) {
   233  	return _UniswapV3Pair.Contract.Fee(&_UniswapV3Pair.CallOpts)
   234  }
   235  
   236  // FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399.
   237  //
   238  // Solidity: function feeGrowthGlobal0X128() view returns(uint256)
   239  func (_UniswapV3Pair *UniswapV3PairCaller) FeeGrowthGlobal0X128(opts *bind.CallOpts) (*big.Int, error) {
   240  	var out []interface{}
   241  	err := _UniswapV3Pair.contract.Call(opts, &out, "feeGrowthGlobal0X128")
   242  
   243  	if err != nil {
   244  		return *new(*big.Int), err
   245  	}
   246  
   247  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   248  
   249  	return out0, err
   250  
   251  }
   252  
   253  // FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399.
   254  //
   255  // Solidity: function feeGrowthGlobal0X128() view returns(uint256)
   256  func (_UniswapV3Pair *UniswapV3PairSession) FeeGrowthGlobal0X128() (*big.Int, error) {
   257  	return _UniswapV3Pair.Contract.FeeGrowthGlobal0X128(&_UniswapV3Pair.CallOpts)
   258  }
   259  
   260  // FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399.
   261  //
   262  // Solidity: function feeGrowthGlobal0X128() view returns(uint256)
   263  func (_UniswapV3Pair *UniswapV3PairCallerSession) FeeGrowthGlobal0X128() (*big.Int, error) {
   264  	return _UniswapV3Pair.Contract.FeeGrowthGlobal0X128(&_UniswapV3Pair.CallOpts)
   265  }
   266  
   267  // FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319.
   268  //
   269  // Solidity: function feeGrowthGlobal1X128() view returns(uint256)
   270  func (_UniswapV3Pair *UniswapV3PairCaller) FeeGrowthGlobal1X128(opts *bind.CallOpts) (*big.Int, error) {
   271  	var out []interface{}
   272  	err := _UniswapV3Pair.contract.Call(opts, &out, "feeGrowthGlobal1X128")
   273  
   274  	if err != nil {
   275  		return *new(*big.Int), err
   276  	}
   277  
   278  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   279  
   280  	return out0, err
   281  
   282  }
   283  
   284  // FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319.
   285  //
   286  // Solidity: function feeGrowthGlobal1X128() view returns(uint256)
   287  func (_UniswapV3Pair *UniswapV3PairSession) FeeGrowthGlobal1X128() (*big.Int, error) {
   288  	return _UniswapV3Pair.Contract.FeeGrowthGlobal1X128(&_UniswapV3Pair.CallOpts)
   289  }
   290  
   291  // FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319.
   292  //
   293  // Solidity: function feeGrowthGlobal1X128() view returns(uint256)
   294  func (_UniswapV3Pair *UniswapV3PairCallerSession) FeeGrowthGlobal1X128() (*big.Int, error) {
   295  	return _UniswapV3Pair.Contract.FeeGrowthGlobal1X128(&_UniswapV3Pair.CallOpts)
   296  }
   297  
   298  // Liquidity is a free data retrieval call binding the contract method 0x1a686502.
   299  //
   300  // Solidity: function liquidity() view returns(uint128)
   301  func (_UniswapV3Pair *UniswapV3PairCaller) Liquidity(opts *bind.CallOpts) (*big.Int, error) {
   302  	var out []interface{}
   303  	err := _UniswapV3Pair.contract.Call(opts, &out, "liquidity")
   304  
   305  	if err != nil {
   306  		return *new(*big.Int), err
   307  	}
   308  
   309  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   310  
   311  	return out0, err
   312  
   313  }
   314  
   315  // Liquidity is a free data retrieval call binding the contract method 0x1a686502.
   316  //
   317  // Solidity: function liquidity() view returns(uint128)
   318  func (_UniswapV3Pair *UniswapV3PairSession) Liquidity() (*big.Int, error) {
   319  	return _UniswapV3Pair.Contract.Liquidity(&_UniswapV3Pair.CallOpts)
   320  }
   321  
   322  // Liquidity is a free data retrieval call binding the contract method 0x1a686502.
   323  //
   324  // Solidity: function liquidity() view returns(uint128)
   325  func (_UniswapV3Pair *UniswapV3PairCallerSession) Liquidity() (*big.Int, error) {
   326  	return _UniswapV3Pair.Contract.Liquidity(&_UniswapV3Pair.CallOpts)
   327  }
   328  
   329  // MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a.
   330  //
   331  // Solidity: function maxLiquidityPerTick() view returns(uint128)
   332  func (_UniswapV3Pair *UniswapV3PairCaller) MaxLiquidityPerTick(opts *bind.CallOpts) (*big.Int, error) {
   333  	var out []interface{}
   334  	err := _UniswapV3Pair.contract.Call(opts, &out, "maxLiquidityPerTick")
   335  
   336  	if err != nil {
   337  		return *new(*big.Int), err
   338  	}
   339  
   340  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   341  
   342  	return out0, err
   343  
   344  }
   345  
   346  // MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a.
   347  //
   348  // Solidity: function maxLiquidityPerTick() view returns(uint128)
   349  func (_UniswapV3Pair *UniswapV3PairSession) MaxLiquidityPerTick() (*big.Int, error) {
   350  	return _UniswapV3Pair.Contract.MaxLiquidityPerTick(&_UniswapV3Pair.CallOpts)
   351  }
   352  
   353  // MaxLiquidityPerTick is a free data retrieval call binding the contract method 0x70cf754a.
   354  //
   355  // Solidity: function maxLiquidityPerTick() view returns(uint128)
   356  func (_UniswapV3Pair *UniswapV3PairCallerSession) MaxLiquidityPerTick() (*big.Int, error) {
   357  	return _UniswapV3Pair.Contract.MaxLiquidityPerTick(&_UniswapV3Pair.CallOpts)
   358  }
   359  
   360  // Observations is a free data retrieval call binding the contract method 0x252c09d7.
   361  //
   362  // Solidity: function observations(uint256 ) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized)
   363  func (_UniswapV3Pair *UniswapV3PairCaller) Observations(opts *bind.CallOpts, arg0 *big.Int) (struct {
   364  	BlockTimestamp                    uint32
   365  	TickCumulative                    *big.Int
   366  	SecondsPerLiquidityCumulativeX128 *big.Int
   367  	Initialized                       bool
   368  }, error) {
   369  	var out []interface{}
   370  	err := _UniswapV3Pair.contract.Call(opts, &out, "observations", arg0)
   371  
   372  	outstruct := new(struct {
   373  		BlockTimestamp                    uint32
   374  		TickCumulative                    *big.Int
   375  		SecondsPerLiquidityCumulativeX128 *big.Int
   376  		Initialized                       bool
   377  	})
   378  
   379  	outstruct.BlockTimestamp = out[0].(uint32)
   380  	outstruct.TickCumulative = out[1].(*big.Int)
   381  	outstruct.SecondsPerLiquidityCumulativeX128 = out[2].(*big.Int)
   382  	outstruct.Initialized = out[3].(bool)
   383  
   384  	return *outstruct, err
   385  
   386  }
   387  
   388  // Observations is a free data retrieval call binding the contract method 0x252c09d7.
   389  //
   390  // Solidity: function observations(uint256 ) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized)
   391  func (_UniswapV3Pair *UniswapV3PairSession) Observations(arg0 *big.Int) (struct {
   392  	BlockTimestamp                    uint32
   393  	TickCumulative                    *big.Int
   394  	SecondsPerLiquidityCumulativeX128 *big.Int
   395  	Initialized                       bool
   396  }, error) {
   397  	return _UniswapV3Pair.Contract.Observations(&_UniswapV3Pair.CallOpts, arg0)
   398  }
   399  
   400  // Observations is a free data retrieval call binding the contract method 0x252c09d7.
   401  //
   402  // Solidity: function observations(uint256 ) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized)
   403  func (_UniswapV3Pair *UniswapV3PairCallerSession) Observations(arg0 *big.Int) (struct {
   404  	BlockTimestamp                    uint32
   405  	TickCumulative                    *big.Int
   406  	SecondsPerLiquidityCumulativeX128 *big.Int
   407  	Initialized                       bool
   408  }, error) {
   409  	return _UniswapV3Pair.Contract.Observations(&_UniswapV3Pair.CallOpts, arg0)
   410  }
   411  
   412  // Observe is a free data retrieval call binding the contract method 0x883bdbfd.
   413  //
   414  // Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s)
   415  func (_UniswapV3Pair *UniswapV3PairCaller) Observe(opts *bind.CallOpts, secondsAgos []uint32) (struct {
   416  	TickCumulatives                    []*big.Int
   417  	SecondsPerLiquidityCumulativeX128s []*big.Int
   418  }, error) {
   419  	var out []interface{}
   420  	err := _UniswapV3Pair.contract.Call(opts, &out, "observe", secondsAgos)
   421  
   422  	outstruct := new(struct {
   423  		TickCumulatives                    []*big.Int
   424  		SecondsPerLiquidityCumulativeX128s []*big.Int
   425  	})
   426  
   427  	outstruct.TickCumulatives = out[0].([]*big.Int)
   428  	outstruct.SecondsPerLiquidityCumulativeX128s = out[1].([]*big.Int)
   429  
   430  	return *outstruct, err
   431  
   432  }
   433  
   434  // Observe is a free data retrieval call binding the contract method 0x883bdbfd.
   435  //
   436  // Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s)
   437  func (_UniswapV3Pair *UniswapV3PairSession) Observe(secondsAgos []uint32) (struct {
   438  	TickCumulatives                    []*big.Int
   439  	SecondsPerLiquidityCumulativeX128s []*big.Int
   440  }, error) {
   441  	return _UniswapV3Pair.Contract.Observe(&_UniswapV3Pair.CallOpts, secondsAgos)
   442  }
   443  
   444  // Observe is a free data retrieval call binding the contract method 0x883bdbfd.
   445  //
   446  // Solidity: function observe(uint32[] secondsAgos) view returns(int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s)
   447  func (_UniswapV3Pair *UniswapV3PairCallerSession) Observe(secondsAgos []uint32) (struct {
   448  	TickCumulatives                    []*big.Int
   449  	SecondsPerLiquidityCumulativeX128s []*big.Int
   450  }, error) {
   451  	return _UniswapV3Pair.Contract.Observe(&_UniswapV3Pair.CallOpts, secondsAgos)
   452  }
   453  
   454  // Positions is a free data retrieval call binding the contract method 0x514ea4bf.
   455  //
   456  // Solidity: function positions(bytes32 ) view returns(uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)
   457  func (_UniswapV3Pair *UniswapV3PairCaller) Positions(opts *bind.CallOpts, arg0 [32]byte) (struct {
   458  	Liquidity                *big.Int
   459  	FeeGrowthInside0LastX128 *big.Int
   460  	FeeGrowthInside1LastX128 *big.Int
   461  	TokensOwed0              *big.Int
   462  	TokensOwed1              *big.Int
   463  }, error) {
   464  	var out []interface{}
   465  	err := _UniswapV3Pair.contract.Call(opts, &out, "positions", arg0)
   466  
   467  	outstruct := new(struct {
   468  		Liquidity                *big.Int
   469  		FeeGrowthInside0LastX128 *big.Int
   470  		FeeGrowthInside1LastX128 *big.Int
   471  		TokensOwed0              *big.Int
   472  		TokensOwed1              *big.Int
   473  	})
   474  
   475  	outstruct.Liquidity = out[0].(*big.Int)
   476  	outstruct.FeeGrowthInside0LastX128 = out[1].(*big.Int)
   477  	outstruct.FeeGrowthInside1LastX128 = out[2].(*big.Int)
   478  	outstruct.TokensOwed0 = out[3].(*big.Int)
   479  	outstruct.TokensOwed1 = out[4].(*big.Int)
   480  
   481  	return *outstruct, err
   482  
   483  }
   484  
   485  // Positions is a free data retrieval call binding the contract method 0x514ea4bf.
   486  //
   487  // Solidity: function positions(bytes32 ) view returns(uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)
   488  func (_UniswapV3Pair *UniswapV3PairSession) Positions(arg0 [32]byte) (struct {
   489  	Liquidity                *big.Int
   490  	FeeGrowthInside0LastX128 *big.Int
   491  	FeeGrowthInside1LastX128 *big.Int
   492  	TokensOwed0              *big.Int
   493  	TokensOwed1              *big.Int
   494  }, error) {
   495  	return _UniswapV3Pair.Contract.Positions(&_UniswapV3Pair.CallOpts, arg0)
   496  }
   497  
   498  // Positions is a free data retrieval call binding the contract method 0x514ea4bf.
   499  //
   500  // Solidity: function positions(bytes32 ) view returns(uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)
   501  func (_UniswapV3Pair *UniswapV3PairCallerSession) Positions(arg0 [32]byte) (struct {
   502  	Liquidity                *big.Int
   503  	FeeGrowthInside0LastX128 *big.Int
   504  	FeeGrowthInside1LastX128 *big.Int
   505  	TokensOwed0              *big.Int
   506  	TokensOwed1              *big.Int
   507  }, error) {
   508  	return _UniswapV3Pair.Contract.Positions(&_UniswapV3Pair.CallOpts, arg0)
   509  }
   510  
   511  // ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b.
   512  //
   513  // Solidity: function protocolFees() view returns(uint128 token0, uint128 token1)
   514  func (_UniswapV3Pair *UniswapV3PairCaller) ProtocolFees(opts *bind.CallOpts) (struct {
   515  	Token0 *big.Int
   516  	Token1 *big.Int
   517  }, error) {
   518  	var out []interface{}
   519  	err := _UniswapV3Pair.contract.Call(opts, &out, "protocolFees")
   520  
   521  	outstruct := new(struct {
   522  		Token0 *big.Int
   523  		Token1 *big.Int
   524  	})
   525  
   526  	outstruct.Token0 = out[0].(*big.Int)
   527  	outstruct.Token1 = out[1].(*big.Int)
   528  
   529  	return *outstruct, err
   530  
   531  }
   532  
   533  // ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b.
   534  //
   535  // Solidity: function protocolFees() view returns(uint128 token0, uint128 token1)
   536  func (_UniswapV3Pair *UniswapV3PairSession) ProtocolFees() (struct {
   537  	Token0 *big.Int
   538  	Token1 *big.Int
   539  }, error) {
   540  	return _UniswapV3Pair.Contract.ProtocolFees(&_UniswapV3Pair.CallOpts)
   541  }
   542  
   543  // ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b.
   544  //
   545  // Solidity: function protocolFees() view returns(uint128 token0, uint128 token1)
   546  func (_UniswapV3Pair *UniswapV3PairCallerSession) ProtocolFees() (struct {
   547  	Token0 *big.Int
   548  	Token1 *big.Int
   549  }, error) {
   550  	return _UniswapV3Pair.Contract.ProtocolFees(&_UniswapV3Pair.CallOpts)
   551  }
   552  
   553  // Slot0 is a free data retrieval call binding the contract method 0x3850c7bd.
   554  //
   555  // Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)
   556  func (_UniswapV3Pair *UniswapV3PairCaller) Slot0(opts *bind.CallOpts) (struct {
   557  	SqrtPriceX96               *big.Int
   558  	Tick                       *big.Int
   559  	ObservationIndex           uint16
   560  	ObservationCardinality     uint16
   561  	ObservationCardinalityNext uint16
   562  	FeeProtocol                uint8
   563  	Unlocked                   bool
   564  }, error) {
   565  	var out []interface{}
   566  	err := _UniswapV3Pair.contract.Call(opts, &out, "slot0")
   567  
   568  	outstruct := new(struct {
   569  		SqrtPriceX96               *big.Int
   570  		Tick                       *big.Int
   571  		ObservationIndex           uint16
   572  		ObservationCardinality     uint16
   573  		ObservationCardinalityNext uint16
   574  		FeeProtocol                uint8
   575  		Unlocked                   bool
   576  	})
   577  
   578  	outstruct.SqrtPriceX96 = out[0].(*big.Int)
   579  	outstruct.Tick = out[1].(*big.Int)
   580  	outstruct.ObservationIndex = out[2].(uint16)
   581  	outstruct.ObservationCardinality = out[3].(uint16)
   582  	outstruct.ObservationCardinalityNext = out[4].(uint16)
   583  	outstruct.FeeProtocol = out[5].(uint8)
   584  	outstruct.Unlocked = out[6].(bool)
   585  
   586  	return *outstruct, err
   587  
   588  }
   589  
   590  // Slot0 is a free data retrieval call binding the contract method 0x3850c7bd.
   591  //
   592  // Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)
   593  func (_UniswapV3Pair *UniswapV3PairSession) Slot0() (struct {
   594  	SqrtPriceX96               *big.Int
   595  	Tick                       *big.Int
   596  	ObservationIndex           uint16
   597  	ObservationCardinality     uint16
   598  	ObservationCardinalityNext uint16
   599  	FeeProtocol                uint8
   600  	Unlocked                   bool
   601  }, error) {
   602  	return _UniswapV3Pair.Contract.Slot0(&_UniswapV3Pair.CallOpts)
   603  }
   604  
   605  // Slot0 is a free data retrieval call binding the contract method 0x3850c7bd.
   606  //
   607  // Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)
   608  func (_UniswapV3Pair *UniswapV3PairCallerSession) Slot0() (struct {
   609  	SqrtPriceX96               *big.Int
   610  	Tick                       *big.Int
   611  	ObservationIndex           uint16
   612  	ObservationCardinality     uint16
   613  	ObservationCardinalityNext uint16
   614  	FeeProtocol                uint8
   615  	Unlocked                   bool
   616  }, error) {
   617  	return _UniswapV3Pair.Contract.Slot0(&_UniswapV3Pair.CallOpts)
   618  }
   619  
   620  // SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2.
   621  //
   622  // Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside)
   623  func (_UniswapV3Pair *UniswapV3PairCaller) SnapshotCumulativesInside(opts *bind.CallOpts, tickLower *big.Int, tickUpper *big.Int) (struct {
   624  	TickCumulativeInside          *big.Int
   625  	SecondsPerLiquidityInsideX128 *big.Int
   626  	SecondsInside                 uint32
   627  }, error) {
   628  	var out []interface{}
   629  	err := _UniswapV3Pair.contract.Call(opts, &out, "snapshotCumulativesInside", tickLower, tickUpper)
   630  
   631  	outstruct := new(struct {
   632  		TickCumulativeInside          *big.Int
   633  		SecondsPerLiquidityInsideX128 *big.Int
   634  		SecondsInside                 uint32
   635  	})
   636  
   637  	outstruct.TickCumulativeInside = out[0].(*big.Int)
   638  	outstruct.SecondsPerLiquidityInsideX128 = out[1].(*big.Int)
   639  	outstruct.SecondsInside = out[2].(uint32)
   640  
   641  	return *outstruct, err
   642  
   643  }
   644  
   645  // SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2.
   646  //
   647  // Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside)
   648  func (_UniswapV3Pair *UniswapV3PairSession) SnapshotCumulativesInside(tickLower *big.Int, tickUpper *big.Int) (struct {
   649  	TickCumulativeInside          *big.Int
   650  	SecondsPerLiquidityInsideX128 *big.Int
   651  	SecondsInside                 uint32
   652  }, error) {
   653  	return _UniswapV3Pair.Contract.SnapshotCumulativesInside(&_UniswapV3Pair.CallOpts, tickLower, tickUpper)
   654  }
   655  
   656  // SnapshotCumulativesInside is a free data retrieval call binding the contract method 0xa38807f2.
   657  //
   658  // Solidity: function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) view returns(int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside)
   659  func (_UniswapV3Pair *UniswapV3PairCallerSession) SnapshotCumulativesInside(tickLower *big.Int, tickUpper *big.Int) (struct {
   660  	TickCumulativeInside          *big.Int
   661  	SecondsPerLiquidityInsideX128 *big.Int
   662  	SecondsInside                 uint32
   663  }, error) {
   664  	return _UniswapV3Pair.Contract.SnapshotCumulativesInside(&_UniswapV3Pair.CallOpts, tickLower, tickUpper)
   665  }
   666  
   667  // TickBitmap is a free data retrieval call binding the contract method 0x5339c296.
   668  //
   669  // Solidity: function tickBitmap(int16 ) view returns(uint256)
   670  func (_UniswapV3Pair *UniswapV3PairCaller) TickBitmap(opts *bind.CallOpts, arg0 int16) (*big.Int, error) {
   671  	var out []interface{}
   672  	err := _UniswapV3Pair.contract.Call(opts, &out, "tickBitmap", arg0)
   673  
   674  	if err != nil {
   675  		return *new(*big.Int), err
   676  	}
   677  
   678  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   679  
   680  	return out0, err
   681  
   682  }
   683  
   684  // TickBitmap is a free data retrieval call binding the contract method 0x5339c296.
   685  //
   686  // Solidity: function tickBitmap(int16 ) view returns(uint256)
   687  func (_UniswapV3Pair *UniswapV3PairSession) TickBitmap(arg0 int16) (*big.Int, error) {
   688  	return _UniswapV3Pair.Contract.TickBitmap(&_UniswapV3Pair.CallOpts, arg0)
   689  }
   690  
   691  // TickBitmap is a free data retrieval call binding the contract method 0x5339c296.
   692  //
   693  // Solidity: function tickBitmap(int16 ) view returns(uint256)
   694  func (_UniswapV3Pair *UniswapV3PairCallerSession) TickBitmap(arg0 int16) (*big.Int, error) {
   695  	return _UniswapV3Pair.Contract.TickBitmap(&_UniswapV3Pair.CallOpts, arg0)
   696  }
   697  
   698  // TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.
   699  //
   700  // Solidity: function tickSpacing() view returns(int24)
   701  func (_UniswapV3Pair *UniswapV3PairCaller) TickSpacing(opts *bind.CallOpts) (*big.Int, error) {
   702  	var out []interface{}
   703  	err := _UniswapV3Pair.contract.Call(opts, &out, "tickSpacing")
   704  
   705  	if err != nil {
   706  		return *new(*big.Int), err
   707  	}
   708  
   709  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   710  
   711  	return out0, err
   712  
   713  }
   714  
   715  // TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.
   716  //
   717  // Solidity: function tickSpacing() view returns(int24)
   718  func (_UniswapV3Pair *UniswapV3PairSession) TickSpacing() (*big.Int, error) {
   719  	return _UniswapV3Pair.Contract.TickSpacing(&_UniswapV3Pair.CallOpts)
   720  }
   721  
   722  // TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.
   723  //
   724  // Solidity: function tickSpacing() view returns(int24)
   725  func (_UniswapV3Pair *UniswapV3PairCallerSession) TickSpacing() (*big.Int, error) {
   726  	return _UniswapV3Pair.Contract.TickSpacing(&_UniswapV3Pair.CallOpts)
   727  }
   728  
   729  // Ticks is a free data retrieval call binding the contract method 0xf30dba93.
   730  //
   731  // Solidity: function ticks(int24 ) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized)
   732  func (_UniswapV3Pair *UniswapV3PairCaller) Ticks(opts *bind.CallOpts, arg0 *big.Int) (struct {
   733  	LiquidityGross                 *big.Int
   734  	LiquidityNet                   *big.Int
   735  	FeeGrowthOutside0X128          *big.Int
   736  	FeeGrowthOutside1X128          *big.Int
   737  	TickCumulativeOutside          *big.Int
   738  	SecondsPerLiquidityOutsideX128 *big.Int
   739  	SecondsOutside                 uint32
   740  	Initialized                    bool
   741  }, error) {
   742  	var out []interface{}
   743  	err := _UniswapV3Pair.contract.Call(opts, &out, "ticks", arg0)
   744  
   745  	outstruct := new(struct {
   746  		LiquidityGross                 *big.Int
   747  		LiquidityNet                   *big.Int
   748  		FeeGrowthOutside0X128          *big.Int
   749  		FeeGrowthOutside1X128          *big.Int
   750  		TickCumulativeOutside          *big.Int
   751  		SecondsPerLiquidityOutsideX128 *big.Int
   752  		SecondsOutside                 uint32
   753  		Initialized                    bool
   754  	})
   755  
   756  	outstruct.LiquidityGross = out[0].(*big.Int)
   757  	outstruct.LiquidityNet = out[1].(*big.Int)
   758  	outstruct.FeeGrowthOutside0X128 = out[2].(*big.Int)
   759  	outstruct.FeeGrowthOutside1X128 = out[3].(*big.Int)
   760  	outstruct.TickCumulativeOutside = out[4].(*big.Int)
   761  	outstruct.SecondsPerLiquidityOutsideX128 = out[5].(*big.Int)
   762  	outstruct.SecondsOutside = out[6].(uint32)
   763  	outstruct.Initialized = out[7].(bool)
   764  
   765  	return *outstruct, err
   766  
   767  }
   768  
   769  // Ticks is a free data retrieval call binding the contract method 0xf30dba93.
   770  //
   771  // Solidity: function ticks(int24 ) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized)
   772  func (_UniswapV3Pair *UniswapV3PairSession) Ticks(arg0 *big.Int) (struct {
   773  	LiquidityGross                 *big.Int
   774  	LiquidityNet                   *big.Int
   775  	FeeGrowthOutside0X128          *big.Int
   776  	FeeGrowthOutside1X128          *big.Int
   777  	TickCumulativeOutside          *big.Int
   778  	SecondsPerLiquidityOutsideX128 *big.Int
   779  	SecondsOutside                 uint32
   780  	Initialized                    bool
   781  }, error) {
   782  	return _UniswapV3Pair.Contract.Ticks(&_UniswapV3Pair.CallOpts, arg0)
   783  }
   784  
   785  // Ticks is a free data retrieval call binding the contract method 0xf30dba93.
   786  //
   787  // Solidity: function ticks(int24 ) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized)
   788  func (_UniswapV3Pair *UniswapV3PairCallerSession) Ticks(arg0 *big.Int) (struct {
   789  	LiquidityGross                 *big.Int
   790  	LiquidityNet                   *big.Int
   791  	FeeGrowthOutside0X128          *big.Int
   792  	FeeGrowthOutside1X128          *big.Int
   793  	TickCumulativeOutside          *big.Int
   794  	SecondsPerLiquidityOutsideX128 *big.Int
   795  	SecondsOutside                 uint32
   796  	Initialized                    bool
   797  }, error) {
   798  	return _UniswapV3Pair.Contract.Ticks(&_UniswapV3Pair.CallOpts, arg0)
   799  }
   800  
   801  // Token0 is a free data retrieval call binding the contract method 0x0dfe1681.
   802  //
   803  // Solidity: function token0() view returns(address)
   804  func (_UniswapV3Pair *UniswapV3PairCaller) Token0(opts *bind.CallOpts) (common.Address, error) {
   805  	var out []interface{}
   806  	err := _UniswapV3Pair.contract.Call(opts, &out, "token0")
   807  
   808  	if err != nil {
   809  		return *new(common.Address), err
   810  	}
   811  
   812  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   813  
   814  	return out0, err
   815  
   816  }
   817  
   818  // Token0 is a free data retrieval call binding the contract method 0x0dfe1681.
   819  //
   820  // Solidity: function token0() view returns(address)
   821  func (_UniswapV3Pair *UniswapV3PairSession) Token0() (common.Address, error) {
   822  	return _UniswapV3Pair.Contract.Token0(&_UniswapV3Pair.CallOpts)
   823  }
   824  
   825  // Token0 is a free data retrieval call binding the contract method 0x0dfe1681.
   826  //
   827  // Solidity: function token0() view returns(address)
   828  func (_UniswapV3Pair *UniswapV3PairCallerSession) Token0() (common.Address, error) {
   829  	return _UniswapV3Pair.Contract.Token0(&_UniswapV3Pair.CallOpts)
   830  }
   831  
   832  // Token1 is a free data retrieval call binding the contract method 0xd21220a7.
   833  //
   834  // Solidity: function token1() view returns(address)
   835  func (_UniswapV3Pair *UniswapV3PairCaller) Token1(opts *bind.CallOpts) (common.Address, error) {
   836  	var out []interface{}
   837  	err := _UniswapV3Pair.contract.Call(opts, &out, "token1")
   838  
   839  	if err != nil {
   840  		return *new(common.Address), err
   841  	}
   842  
   843  	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
   844  
   845  	return out0, err
   846  
   847  }
   848  
   849  // Token1 is a free data retrieval call binding the contract method 0xd21220a7.
   850  //
   851  // Solidity: function token1() view returns(address)
   852  func (_UniswapV3Pair *UniswapV3PairSession) Token1() (common.Address, error) {
   853  	return _UniswapV3Pair.Contract.Token1(&_UniswapV3Pair.CallOpts)
   854  }
   855  
   856  // Token1 is a free data retrieval call binding the contract method 0xd21220a7.
   857  //
   858  // Solidity: function token1() view returns(address)
   859  func (_UniswapV3Pair *UniswapV3PairCallerSession) Token1() (common.Address, error) {
   860  	return _UniswapV3Pair.Contract.Token1(&_UniswapV3Pair.CallOpts)
   861  }
   862  
   863  // Burn is a paid mutator transaction binding the contract method 0xa34123a7.
   864  //
   865  // Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1)
   866  func (_UniswapV3Pair *UniswapV3PairTransactor) Burn(opts *bind.TransactOpts, tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) {
   867  	return _UniswapV3Pair.contract.Transact(opts, "burn", tickLower, tickUpper, amount)
   868  }
   869  
   870  // Burn is a paid mutator transaction binding the contract method 0xa34123a7.
   871  //
   872  // Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1)
   873  func (_UniswapV3Pair *UniswapV3PairSession) Burn(tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) {
   874  	return _UniswapV3Pair.Contract.Burn(&_UniswapV3Pair.TransactOpts, tickLower, tickUpper, amount)
   875  }
   876  
   877  // Burn is a paid mutator transaction binding the contract method 0xa34123a7.
   878  //
   879  // Solidity: function burn(int24 tickLower, int24 tickUpper, uint128 amount) returns(uint256 amount0, uint256 amount1)
   880  func (_UniswapV3Pair *UniswapV3PairTransactorSession) Burn(tickLower *big.Int, tickUpper *big.Int, amount *big.Int) (*types.Transaction, error) {
   881  	return _UniswapV3Pair.Contract.Burn(&_UniswapV3Pair.TransactOpts, tickLower, tickUpper, amount)
   882  }
   883  
   884  // Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8.
   885  //
   886  // Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1)
   887  func (_UniswapV3Pair *UniswapV3PairTransactor) Collect(opts *bind.TransactOpts, recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) {
   888  	return _UniswapV3Pair.contract.Transact(opts, "collect", recipient, tickLower, tickUpper, amount0Requested, amount1Requested)
   889  }
   890  
   891  // Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8.
   892  //
   893  // Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1)
   894  func (_UniswapV3Pair *UniswapV3PairSession) Collect(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) {
   895  	return _UniswapV3Pair.Contract.Collect(&_UniswapV3Pair.TransactOpts, recipient, tickLower, tickUpper, amount0Requested, amount1Requested)
   896  }
   897  
   898  // Collect is a paid mutator transaction binding the contract method 0x4f1eb3d8.
   899  //
   900  // Solidity: function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1)
   901  func (_UniswapV3Pair *UniswapV3PairTransactorSession) Collect(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) {
   902  	return _UniswapV3Pair.Contract.Collect(&_UniswapV3Pair.TransactOpts, recipient, tickLower, tickUpper, amount0Requested, amount1Requested)
   903  }
   904  
   905  // CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729.
   906  //
   907  // Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1)
   908  func (_UniswapV3Pair *UniswapV3PairTransactor) CollectProtocol(opts *bind.TransactOpts, recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) {
   909  	return _UniswapV3Pair.contract.Transact(opts, "collectProtocol", recipient, amount0Requested, amount1Requested)
   910  }
   911  
   912  // CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729.
   913  //
   914  // Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1)
   915  func (_UniswapV3Pair *UniswapV3PairSession) CollectProtocol(recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) {
   916  	return _UniswapV3Pair.Contract.CollectProtocol(&_UniswapV3Pair.TransactOpts, recipient, amount0Requested, amount1Requested)
   917  }
   918  
   919  // CollectProtocol is a paid mutator transaction binding the contract method 0x85b66729.
   920  //
   921  // Solidity: function collectProtocol(address recipient, uint128 amount0Requested, uint128 amount1Requested) returns(uint128 amount0, uint128 amount1)
   922  func (_UniswapV3Pair *UniswapV3PairTransactorSession) CollectProtocol(recipient common.Address, amount0Requested *big.Int, amount1Requested *big.Int) (*types.Transaction, error) {
   923  	return _UniswapV3Pair.Contract.CollectProtocol(&_UniswapV3Pair.TransactOpts, recipient, amount0Requested, amount1Requested)
   924  }
   925  
   926  // Flash is a paid mutator transaction binding the contract method 0x490e6cbc.
   927  //
   928  // Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns()
   929  func (_UniswapV3Pair *UniswapV3PairTransactor) Flash(opts *bind.TransactOpts, recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) {
   930  	return _UniswapV3Pair.contract.Transact(opts, "flash", recipient, amount0, amount1, data)
   931  }
   932  
   933  // Flash is a paid mutator transaction binding the contract method 0x490e6cbc.
   934  //
   935  // Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns()
   936  func (_UniswapV3Pair *UniswapV3PairSession) Flash(recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) {
   937  	return _UniswapV3Pair.Contract.Flash(&_UniswapV3Pair.TransactOpts, recipient, amount0, amount1, data)
   938  }
   939  
   940  // Flash is a paid mutator transaction binding the contract method 0x490e6cbc.
   941  //
   942  // Solidity: function flash(address recipient, uint256 amount0, uint256 amount1, bytes data) returns()
   943  func (_UniswapV3Pair *UniswapV3PairTransactorSession) Flash(recipient common.Address, amount0 *big.Int, amount1 *big.Int, data []byte) (*types.Transaction, error) {
   944  	return _UniswapV3Pair.Contract.Flash(&_UniswapV3Pair.TransactOpts, recipient, amount0, amount1, data)
   945  }
   946  
   947  // IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67.
   948  //
   949  // Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns()
   950  func (_UniswapV3Pair *UniswapV3PairTransactor) IncreaseObservationCardinalityNext(opts *bind.TransactOpts, observationCardinalityNext uint16) (*types.Transaction, error) {
   951  	return _UniswapV3Pair.contract.Transact(opts, "increaseObservationCardinalityNext", observationCardinalityNext)
   952  }
   953  
   954  // IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67.
   955  //
   956  // Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns()
   957  func (_UniswapV3Pair *UniswapV3PairSession) IncreaseObservationCardinalityNext(observationCardinalityNext uint16) (*types.Transaction, error) {
   958  	return _UniswapV3Pair.Contract.IncreaseObservationCardinalityNext(&_UniswapV3Pair.TransactOpts, observationCardinalityNext)
   959  }
   960  
   961  // IncreaseObservationCardinalityNext is a paid mutator transaction binding the contract method 0x32148f67.
   962  //
   963  // Solidity: function increaseObservationCardinalityNext(uint16 observationCardinalityNext) returns()
   964  func (_UniswapV3Pair *UniswapV3PairTransactorSession) IncreaseObservationCardinalityNext(observationCardinalityNext uint16) (*types.Transaction, error) {
   965  	return _UniswapV3Pair.Contract.IncreaseObservationCardinalityNext(&_UniswapV3Pair.TransactOpts, observationCardinalityNext)
   966  }
   967  
   968  // Initialize is a paid mutator transaction binding the contract method 0xf637731d.
   969  //
   970  // Solidity: function initialize(uint160 sqrtPriceX96) returns()
   971  func (_UniswapV3Pair *UniswapV3PairTransactor) Initialize(opts *bind.TransactOpts, sqrtPriceX96 *big.Int) (*types.Transaction, error) {
   972  	return _UniswapV3Pair.contract.Transact(opts, "initialize", sqrtPriceX96)
   973  }
   974  
   975  // Initialize is a paid mutator transaction binding the contract method 0xf637731d.
   976  //
   977  // Solidity: function initialize(uint160 sqrtPriceX96) returns()
   978  func (_UniswapV3Pair *UniswapV3PairSession) Initialize(sqrtPriceX96 *big.Int) (*types.Transaction, error) {
   979  	return _UniswapV3Pair.Contract.Initialize(&_UniswapV3Pair.TransactOpts, sqrtPriceX96)
   980  }
   981  
   982  // Initialize is a paid mutator transaction binding the contract method 0xf637731d.
   983  //
   984  // Solidity: function initialize(uint160 sqrtPriceX96) returns()
   985  func (_UniswapV3Pair *UniswapV3PairTransactorSession) Initialize(sqrtPriceX96 *big.Int) (*types.Transaction, error) {
   986  	return _UniswapV3Pair.Contract.Initialize(&_UniswapV3Pair.TransactOpts, sqrtPriceX96)
   987  }
   988  
   989  // Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d.
   990  //
   991  // Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1)
   992  func (_UniswapV3Pair *UniswapV3PairTransactor) Mint(opts *bind.TransactOpts, recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) {
   993  	return _UniswapV3Pair.contract.Transact(opts, "mint", recipient, tickLower, tickUpper, amount, data)
   994  }
   995  
   996  // Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d.
   997  //
   998  // Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1)
   999  func (_UniswapV3Pair *UniswapV3PairSession) Mint(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) {
  1000  	return _UniswapV3Pair.Contract.Mint(&_UniswapV3Pair.TransactOpts, recipient, tickLower, tickUpper, amount, data)
  1001  }
  1002  
  1003  // Mint is a paid mutator transaction binding the contract method 0x3c8a7d8d.
  1004  //
  1005  // Solidity: function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes data) returns(uint256 amount0, uint256 amount1)
  1006  func (_UniswapV3Pair *UniswapV3PairTransactorSession) Mint(recipient common.Address, tickLower *big.Int, tickUpper *big.Int, amount *big.Int, data []byte) (*types.Transaction, error) {
  1007  	return _UniswapV3Pair.Contract.Mint(&_UniswapV3Pair.TransactOpts, recipient, tickLower, tickUpper, amount, data)
  1008  }
  1009  
  1010  // SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1.
  1011  //
  1012  // Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns()
  1013  func (_UniswapV3Pair *UniswapV3PairTransactor) SetFeeProtocol(opts *bind.TransactOpts, feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) {
  1014  	return _UniswapV3Pair.contract.Transact(opts, "setFeeProtocol", feeProtocol0, feeProtocol1)
  1015  }
  1016  
  1017  // SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1.
  1018  //
  1019  // Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns()
  1020  func (_UniswapV3Pair *UniswapV3PairSession) SetFeeProtocol(feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) {
  1021  	return _UniswapV3Pair.Contract.SetFeeProtocol(&_UniswapV3Pair.TransactOpts, feeProtocol0, feeProtocol1)
  1022  }
  1023  
  1024  // SetFeeProtocol is a paid mutator transaction binding the contract method 0x8206a4d1.
  1025  //
  1026  // Solidity: function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) returns()
  1027  func (_UniswapV3Pair *UniswapV3PairTransactorSession) SetFeeProtocol(feeProtocol0 uint8, feeProtocol1 uint8) (*types.Transaction, error) {
  1028  	return _UniswapV3Pair.Contract.SetFeeProtocol(&_UniswapV3Pair.TransactOpts, feeProtocol0, feeProtocol1)
  1029  }
  1030  
  1031  // Swap is a paid mutator transaction binding the contract method 0x128acb08.
  1032  //
  1033  // Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1)
  1034  func (_UniswapV3Pair *UniswapV3PairTransactor) Swap(opts *bind.TransactOpts, recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) {
  1035  	return _UniswapV3Pair.contract.Transact(opts, "swap", recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data)
  1036  }
  1037  
  1038  // Swap is a paid mutator transaction binding the contract method 0x128acb08.
  1039  //
  1040  // Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1)
  1041  func (_UniswapV3Pair *UniswapV3PairSession) Swap(recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) {
  1042  	return _UniswapV3Pair.Contract.Swap(&_UniswapV3Pair.TransactOpts, recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data)
  1043  }
  1044  
  1045  // Swap is a paid mutator transaction binding the contract method 0x128acb08.
  1046  //
  1047  // Solidity: function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes data) returns(int256 amount0, int256 amount1)
  1048  func (_UniswapV3Pair *UniswapV3PairTransactorSession) Swap(recipient common.Address, zeroForOne bool, amountSpecified *big.Int, sqrtPriceLimitX96 *big.Int, data []byte) (*types.Transaction, error) {
  1049  	return _UniswapV3Pair.Contract.Swap(&_UniswapV3Pair.TransactOpts, recipient, zeroForOne, amountSpecified, sqrtPriceLimitX96, data)
  1050  }
  1051  
  1052  // UniswapV3PairBurnIterator is returned from FilterBurn and is used to iterate over the raw logs and unpacked data for Burn events raised by the UniswapV3Pair contract.
  1053  type UniswapV3PairBurnIterator struct {
  1054  	Event *UniswapV3PairBurn // Event containing the contract specifics and raw log
  1055  
  1056  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1057  	event    string              // Event name to use for unpacking event data
  1058  
  1059  	logs chan types.Log        // Log channel receiving the found contract events
  1060  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1061  	done bool                  // Whether the subscription completed delivering logs
  1062  	fail error                 // Occurred error to stop iteration
  1063  }
  1064  
  1065  // Next advances the iterator to the subsequent event, returning whether there
  1066  // are any more events found. In case of a retrieval or parsing error, false is
  1067  // returned and Error() can be queried for the exact failure.
  1068  func (it *UniswapV3PairBurnIterator) Next() bool {
  1069  	// If the iterator failed, stop iterating
  1070  	if it.fail != nil {
  1071  		return false
  1072  	}
  1073  	// If the iterator completed, deliver directly whatever's available
  1074  	if it.done {
  1075  		select {
  1076  		case log := <-it.logs:
  1077  			it.Event = new(UniswapV3PairBurn)
  1078  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1079  				it.fail = err
  1080  				return false
  1081  			}
  1082  			it.Event.Raw = log
  1083  			return true
  1084  
  1085  		default:
  1086  			return false
  1087  		}
  1088  	}
  1089  	// Iterator still in progress, wait for either a data or an error event
  1090  	select {
  1091  	case log := <-it.logs:
  1092  		it.Event = new(UniswapV3PairBurn)
  1093  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1094  			it.fail = err
  1095  			return false
  1096  		}
  1097  		it.Event.Raw = log
  1098  		return true
  1099  
  1100  	case err := <-it.sub.Err():
  1101  		it.done = true
  1102  		it.fail = err
  1103  		return it.Next()
  1104  	}
  1105  }
  1106  
  1107  // Error returns any retrieval or parsing error occurred during filtering.
  1108  func (it *UniswapV3PairBurnIterator) Error() error {
  1109  	return it.fail
  1110  }
  1111  
  1112  // Close terminates the iteration process, releasing any pending underlying
  1113  // resources.
  1114  func (it *UniswapV3PairBurnIterator) Close() error {
  1115  	it.sub.Unsubscribe()
  1116  	return nil
  1117  }
  1118  
  1119  // UniswapV3PairBurn represents a Burn event raised by the UniswapV3Pair contract.
  1120  type UniswapV3PairBurn struct {
  1121  	Owner     common.Address
  1122  	TickLower *big.Int
  1123  	TickUpper *big.Int
  1124  	Amount    *big.Int
  1125  	Amount0   *big.Int
  1126  	Amount1   *big.Int
  1127  	Raw       types.Log // Blockchain specific contextual infos
  1128  }
  1129  
  1130  // FilterBurn is a free log retrieval operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c.
  1131  //
  1132  // Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
  1133  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterBurn(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*UniswapV3PairBurnIterator, error) {
  1134  
  1135  	var ownerRule []interface{}
  1136  	for _, ownerItem := range owner {
  1137  		ownerRule = append(ownerRule, ownerItem)
  1138  	}
  1139  	var tickLowerRule []interface{}
  1140  	for _, tickLowerItem := range tickLower {
  1141  		tickLowerRule = append(tickLowerRule, tickLowerItem)
  1142  	}
  1143  	var tickUpperRule []interface{}
  1144  	for _, tickUpperItem := range tickUpper {
  1145  		tickUpperRule = append(tickUpperRule, tickUpperItem)
  1146  	}
  1147  
  1148  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "Burn", ownerRule, tickLowerRule, tickUpperRule)
  1149  	if err != nil {
  1150  		return nil, err
  1151  	}
  1152  	return &UniswapV3PairBurnIterator{contract: _UniswapV3Pair.contract, event: "Burn", logs: logs, sub: sub}, nil
  1153  }
  1154  
  1155  // WatchBurn is a free log subscription operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c.
  1156  //
  1157  // Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
  1158  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchBurn(opts *bind.WatchOpts, sink chan<- *UniswapV3PairBurn, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) {
  1159  
  1160  	var ownerRule []interface{}
  1161  	for _, ownerItem := range owner {
  1162  		ownerRule = append(ownerRule, ownerItem)
  1163  	}
  1164  	var tickLowerRule []interface{}
  1165  	for _, tickLowerItem := range tickLower {
  1166  		tickLowerRule = append(tickLowerRule, tickLowerItem)
  1167  	}
  1168  	var tickUpperRule []interface{}
  1169  	for _, tickUpperItem := range tickUpper {
  1170  		tickUpperRule = append(tickUpperRule, tickUpperItem)
  1171  	}
  1172  
  1173  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "Burn", ownerRule, tickLowerRule, tickUpperRule)
  1174  	if err != nil {
  1175  		return nil, err
  1176  	}
  1177  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1178  		defer sub.Unsubscribe()
  1179  		for {
  1180  			select {
  1181  			case log := <-logs:
  1182  				// New log arrived, parse the event and forward to the user
  1183  				event := new(UniswapV3PairBurn)
  1184  				if err := _UniswapV3Pair.contract.UnpackLog(event, "Burn", log); err != nil {
  1185  					return err
  1186  				}
  1187  				event.Raw = log
  1188  
  1189  				select {
  1190  				case sink <- event:
  1191  				case err := <-sub.Err():
  1192  					return err
  1193  				case <-quit:
  1194  					return nil
  1195  				}
  1196  			case err := <-sub.Err():
  1197  				return err
  1198  			case <-quit:
  1199  				return nil
  1200  			}
  1201  		}
  1202  	}), nil
  1203  }
  1204  
  1205  // ParseBurn is a log parse operation binding the contract event 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c.
  1206  //
  1207  // Solidity: event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
  1208  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseBurn(log types.Log) (*UniswapV3PairBurn, error) {
  1209  	event := new(UniswapV3PairBurn)
  1210  	if err := _UniswapV3Pair.contract.UnpackLog(event, "Burn", log); err != nil {
  1211  		return nil, err
  1212  	}
  1213  	event.Raw = log
  1214  	return event, nil
  1215  }
  1216  
  1217  // UniswapV3PairCollectIterator is returned from FilterCollect and is used to iterate over the raw logs and unpacked data for Collect events raised by the UniswapV3Pair contract.
  1218  type UniswapV3PairCollectIterator struct {
  1219  	Event *UniswapV3PairCollect // Event containing the contract specifics and raw log
  1220  
  1221  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1222  	event    string              // Event name to use for unpacking event data
  1223  
  1224  	logs chan types.Log        // Log channel receiving the found contract events
  1225  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1226  	done bool                  // Whether the subscription completed delivering logs
  1227  	fail error                 // Occurred error to stop iteration
  1228  }
  1229  
  1230  // Next advances the iterator to the subsequent event, returning whether there
  1231  // are any more events found. In case of a retrieval or parsing error, false is
  1232  // returned and Error() can be queried for the exact failure.
  1233  func (it *UniswapV3PairCollectIterator) Next() bool {
  1234  	// If the iterator failed, stop iterating
  1235  	if it.fail != nil {
  1236  		return false
  1237  	}
  1238  	// If the iterator completed, deliver directly whatever's available
  1239  	if it.done {
  1240  		select {
  1241  		case log := <-it.logs:
  1242  			it.Event = new(UniswapV3PairCollect)
  1243  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1244  				it.fail = err
  1245  				return false
  1246  			}
  1247  			it.Event.Raw = log
  1248  			return true
  1249  
  1250  		default:
  1251  			return false
  1252  		}
  1253  	}
  1254  	// Iterator still in progress, wait for either a data or an error event
  1255  	select {
  1256  	case log := <-it.logs:
  1257  		it.Event = new(UniswapV3PairCollect)
  1258  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1259  			it.fail = err
  1260  			return false
  1261  		}
  1262  		it.Event.Raw = log
  1263  		return true
  1264  
  1265  	case err := <-it.sub.Err():
  1266  		it.done = true
  1267  		it.fail = err
  1268  		return it.Next()
  1269  	}
  1270  }
  1271  
  1272  // Error returns any retrieval or parsing error occurred during filtering.
  1273  func (it *UniswapV3PairCollectIterator) Error() error {
  1274  	return it.fail
  1275  }
  1276  
  1277  // Close terminates the iteration process, releasing any pending underlying
  1278  // resources.
  1279  func (it *UniswapV3PairCollectIterator) Close() error {
  1280  	it.sub.Unsubscribe()
  1281  	return nil
  1282  }
  1283  
  1284  // UniswapV3PairCollect represents a Collect event raised by the UniswapV3Pair contract.
  1285  type UniswapV3PairCollect struct {
  1286  	Owner     common.Address
  1287  	Recipient common.Address
  1288  	TickLower *big.Int
  1289  	TickUpper *big.Int
  1290  	Amount0   *big.Int
  1291  	Amount1   *big.Int
  1292  	Raw       types.Log // Blockchain specific contextual infos
  1293  }
  1294  
  1295  // FilterCollect is a free log retrieval operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0.
  1296  //
  1297  // Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1)
  1298  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterCollect(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*UniswapV3PairCollectIterator, error) {
  1299  
  1300  	var ownerRule []interface{}
  1301  	for _, ownerItem := range owner {
  1302  		ownerRule = append(ownerRule, ownerItem)
  1303  	}
  1304  
  1305  	var tickLowerRule []interface{}
  1306  	for _, tickLowerItem := range tickLower {
  1307  		tickLowerRule = append(tickLowerRule, tickLowerItem)
  1308  	}
  1309  	var tickUpperRule []interface{}
  1310  	for _, tickUpperItem := range tickUpper {
  1311  		tickUpperRule = append(tickUpperRule, tickUpperItem)
  1312  	}
  1313  
  1314  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "Collect", ownerRule, tickLowerRule, tickUpperRule)
  1315  	if err != nil {
  1316  		return nil, err
  1317  	}
  1318  	return &UniswapV3PairCollectIterator{contract: _UniswapV3Pair.contract, event: "Collect", logs: logs, sub: sub}, nil
  1319  }
  1320  
  1321  // WatchCollect is a free log subscription operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0.
  1322  //
  1323  // Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1)
  1324  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchCollect(opts *bind.WatchOpts, sink chan<- *UniswapV3PairCollect, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) {
  1325  
  1326  	var ownerRule []interface{}
  1327  	for _, ownerItem := range owner {
  1328  		ownerRule = append(ownerRule, ownerItem)
  1329  	}
  1330  
  1331  	var tickLowerRule []interface{}
  1332  	for _, tickLowerItem := range tickLower {
  1333  		tickLowerRule = append(tickLowerRule, tickLowerItem)
  1334  	}
  1335  	var tickUpperRule []interface{}
  1336  	for _, tickUpperItem := range tickUpper {
  1337  		tickUpperRule = append(tickUpperRule, tickUpperItem)
  1338  	}
  1339  
  1340  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "Collect", ownerRule, tickLowerRule, tickUpperRule)
  1341  	if err != nil {
  1342  		return nil, err
  1343  	}
  1344  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1345  		defer sub.Unsubscribe()
  1346  		for {
  1347  			select {
  1348  			case log := <-logs:
  1349  				// New log arrived, parse the event and forward to the user
  1350  				event := new(UniswapV3PairCollect)
  1351  				if err := _UniswapV3Pair.contract.UnpackLog(event, "Collect", log); err != nil {
  1352  					return err
  1353  				}
  1354  				event.Raw = log
  1355  
  1356  				select {
  1357  				case sink <- event:
  1358  				case err := <-sub.Err():
  1359  					return err
  1360  				case <-quit:
  1361  					return nil
  1362  				}
  1363  			case err := <-sub.Err():
  1364  				return err
  1365  			case <-quit:
  1366  				return nil
  1367  			}
  1368  		}
  1369  	}), nil
  1370  }
  1371  
  1372  // ParseCollect is a log parse operation binding the contract event 0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0.
  1373  //
  1374  // Solidity: event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1)
  1375  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseCollect(log types.Log) (*UniswapV3PairCollect, error) {
  1376  	event := new(UniswapV3PairCollect)
  1377  	if err := _UniswapV3Pair.contract.UnpackLog(event, "Collect", log); err != nil {
  1378  		return nil, err
  1379  	}
  1380  	event.Raw = log
  1381  	return event, nil
  1382  }
  1383  
  1384  // UniswapV3PairCollectProtocolIterator is returned from FilterCollectProtocol and is used to iterate over the raw logs and unpacked data for CollectProtocol events raised by the UniswapV3Pair contract.
  1385  type UniswapV3PairCollectProtocolIterator struct {
  1386  	Event *UniswapV3PairCollectProtocol // Event containing the contract specifics and raw log
  1387  
  1388  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1389  	event    string              // Event name to use for unpacking event data
  1390  
  1391  	logs chan types.Log        // Log channel receiving the found contract events
  1392  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1393  	done bool                  // Whether the subscription completed delivering logs
  1394  	fail error                 // Occurred error to stop iteration
  1395  }
  1396  
  1397  // Next advances the iterator to the subsequent event, returning whether there
  1398  // are any more events found. In case of a retrieval or parsing error, false is
  1399  // returned and Error() can be queried for the exact failure.
  1400  func (it *UniswapV3PairCollectProtocolIterator) Next() bool {
  1401  	// If the iterator failed, stop iterating
  1402  	if it.fail != nil {
  1403  		return false
  1404  	}
  1405  	// If the iterator completed, deliver directly whatever's available
  1406  	if it.done {
  1407  		select {
  1408  		case log := <-it.logs:
  1409  			it.Event = new(UniswapV3PairCollectProtocol)
  1410  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1411  				it.fail = err
  1412  				return false
  1413  			}
  1414  			it.Event.Raw = log
  1415  			return true
  1416  
  1417  		default:
  1418  			return false
  1419  		}
  1420  	}
  1421  	// Iterator still in progress, wait for either a data or an error event
  1422  	select {
  1423  	case log := <-it.logs:
  1424  		it.Event = new(UniswapV3PairCollectProtocol)
  1425  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1426  			it.fail = err
  1427  			return false
  1428  		}
  1429  		it.Event.Raw = log
  1430  		return true
  1431  
  1432  	case err := <-it.sub.Err():
  1433  		it.done = true
  1434  		it.fail = err
  1435  		return it.Next()
  1436  	}
  1437  }
  1438  
  1439  // Error returns any retrieval or parsing error occurred during filtering.
  1440  func (it *UniswapV3PairCollectProtocolIterator) Error() error {
  1441  	return it.fail
  1442  }
  1443  
  1444  // Close terminates the iteration process, releasing any pending underlying
  1445  // resources.
  1446  func (it *UniswapV3PairCollectProtocolIterator) Close() error {
  1447  	it.sub.Unsubscribe()
  1448  	return nil
  1449  }
  1450  
  1451  // UniswapV3PairCollectProtocol represents a CollectProtocol event raised by the UniswapV3Pair contract.
  1452  type UniswapV3PairCollectProtocol struct {
  1453  	Sender    common.Address
  1454  	Recipient common.Address
  1455  	Amount0   *big.Int
  1456  	Amount1   *big.Int
  1457  	Raw       types.Log // Blockchain specific contextual infos
  1458  }
  1459  
  1460  // FilterCollectProtocol is a free log retrieval operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151.
  1461  //
  1462  // Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1)
  1463  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterCollectProtocol(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*UniswapV3PairCollectProtocolIterator, error) {
  1464  
  1465  	var senderRule []interface{}
  1466  	for _, senderItem := range sender {
  1467  		senderRule = append(senderRule, senderItem)
  1468  	}
  1469  	var recipientRule []interface{}
  1470  	for _, recipientItem := range recipient {
  1471  		recipientRule = append(recipientRule, recipientItem)
  1472  	}
  1473  
  1474  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "CollectProtocol", senderRule, recipientRule)
  1475  	if err != nil {
  1476  		return nil, err
  1477  	}
  1478  	return &UniswapV3PairCollectProtocolIterator{contract: _UniswapV3Pair.contract, event: "CollectProtocol", logs: logs, sub: sub}, nil
  1479  }
  1480  
  1481  // WatchCollectProtocol is a free log subscription operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151.
  1482  //
  1483  // Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1)
  1484  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchCollectProtocol(opts *bind.WatchOpts, sink chan<- *UniswapV3PairCollectProtocol, sender []common.Address, recipient []common.Address) (event.Subscription, error) {
  1485  
  1486  	var senderRule []interface{}
  1487  	for _, senderItem := range sender {
  1488  		senderRule = append(senderRule, senderItem)
  1489  	}
  1490  	var recipientRule []interface{}
  1491  	for _, recipientItem := range recipient {
  1492  		recipientRule = append(recipientRule, recipientItem)
  1493  	}
  1494  
  1495  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "CollectProtocol", senderRule, recipientRule)
  1496  	if err != nil {
  1497  		return nil, err
  1498  	}
  1499  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1500  		defer sub.Unsubscribe()
  1501  		for {
  1502  			select {
  1503  			case log := <-logs:
  1504  				// New log arrived, parse the event and forward to the user
  1505  				event := new(UniswapV3PairCollectProtocol)
  1506  				if err := _UniswapV3Pair.contract.UnpackLog(event, "CollectProtocol", log); err != nil {
  1507  					return err
  1508  				}
  1509  				event.Raw = log
  1510  
  1511  				select {
  1512  				case sink <- event:
  1513  				case err := <-sub.Err():
  1514  					return err
  1515  				case <-quit:
  1516  					return nil
  1517  				}
  1518  			case err := <-sub.Err():
  1519  				return err
  1520  			case <-quit:
  1521  				return nil
  1522  			}
  1523  		}
  1524  	}), nil
  1525  }
  1526  
  1527  // ParseCollectProtocol is a log parse operation binding the contract event 0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151.
  1528  //
  1529  // Solidity: event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1)
  1530  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseCollectProtocol(log types.Log) (*UniswapV3PairCollectProtocol, error) {
  1531  	event := new(UniswapV3PairCollectProtocol)
  1532  	if err := _UniswapV3Pair.contract.UnpackLog(event, "CollectProtocol", log); err != nil {
  1533  		return nil, err
  1534  	}
  1535  	event.Raw = log
  1536  	return event, nil
  1537  }
  1538  
  1539  // UniswapV3PairFlashIterator is returned from FilterFlash and is used to iterate over the raw logs and unpacked data for Flash events raised by the UniswapV3Pair contract.
  1540  type UniswapV3PairFlashIterator struct {
  1541  	Event *UniswapV3PairFlash // Event containing the contract specifics and raw log
  1542  
  1543  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1544  	event    string              // Event name to use for unpacking event data
  1545  
  1546  	logs chan types.Log        // Log channel receiving the found contract events
  1547  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1548  	done bool                  // Whether the subscription completed delivering logs
  1549  	fail error                 // Occurred error to stop iteration
  1550  }
  1551  
  1552  // Next advances the iterator to the subsequent event, returning whether there
  1553  // are any more events found. In case of a retrieval or parsing error, false is
  1554  // returned and Error() can be queried for the exact failure.
  1555  func (it *UniswapV3PairFlashIterator) Next() bool {
  1556  	// If the iterator failed, stop iterating
  1557  	if it.fail != nil {
  1558  		return false
  1559  	}
  1560  	// If the iterator completed, deliver directly whatever's available
  1561  	if it.done {
  1562  		select {
  1563  		case log := <-it.logs:
  1564  			it.Event = new(UniswapV3PairFlash)
  1565  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1566  				it.fail = err
  1567  				return false
  1568  			}
  1569  			it.Event.Raw = log
  1570  			return true
  1571  
  1572  		default:
  1573  			return false
  1574  		}
  1575  	}
  1576  	// Iterator still in progress, wait for either a data or an error event
  1577  	select {
  1578  	case log := <-it.logs:
  1579  		it.Event = new(UniswapV3PairFlash)
  1580  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1581  			it.fail = err
  1582  			return false
  1583  		}
  1584  		it.Event.Raw = log
  1585  		return true
  1586  
  1587  	case err := <-it.sub.Err():
  1588  		it.done = true
  1589  		it.fail = err
  1590  		return it.Next()
  1591  	}
  1592  }
  1593  
  1594  // Error returns any retrieval or parsing error occurred during filtering.
  1595  func (it *UniswapV3PairFlashIterator) Error() error {
  1596  	return it.fail
  1597  }
  1598  
  1599  // Close terminates the iteration process, releasing any pending underlying
  1600  // resources.
  1601  func (it *UniswapV3PairFlashIterator) Close() error {
  1602  	it.sub.Unsubscribe()
  1603  	return nil
  1604  }
  1605  
  1606  // UniswapV3PairFlash represents a Flash event raised by the UniswapV3Pair contract.
  1607  type UniswapV3PairFlash struct {
  1608  	Sender    common.Address
  1609  	Recipient common.Address
  1610  	Amount0   *big.Int
  1611  	Amount1   *big.Int
  1612  	Paid0     *big.Int
  1613  	Paid1     *big.Int
  1614  	Raw       types.Log // Blockchain specific contextual infos
  1615  }
  1616  
  1617  // FilterFlash is a free log retrieval operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633.
  1618  //
  1619  // Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1)
  1620  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterFlash(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*UniswapV3PairFlashIterator, error) {
  1621  
  1622  	var senderRule []interface{}
  1623  	for _, senderItem := range sender {
  1624  		senderRule = append(senderRule, senderItem)
  1625  	}
  1626  	var recipientRule []interface{}
  1627  	for _, recipientItem := range recipient {
  1628  		recipientRule = append(recipientRule, recipientItem)
  1629  	}
  1630  
  1631  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "Flash", senderRule, recipientRule)
  1632  	if err != nil {
  1633  		return nil, err
  1634  	}
  1635  	return &UniswapV3PairFlashIterator{contract: _UniswapV3Pair.contract, event: "Flash", logs: logs, sub: sub}, nil
  1636  }
  1637  
  1638  // WatchFlash is a free log subscription operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633.
  1639  //
  1640  // Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1)
  1641  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchFlash(opts *bind.WatchOpts, sink chan<- *UniswapV3PairFlash, sender []common.Address, recipient []common.Address) (event.Subscription, error) {
  1642  
  1643  	var senderRule []interface{}
  1644  	for _, senderItem := range sender {
  1645  		senderRule = append(senderRule, senderItem)
  1646  	}
  1647  	var recipientRule []interface{}
  1648  	for _, recipientItem := range recipient {
  1649  		recipientRule = append(recipientRule, recipientItem)
  1650  	}
  1651  
  1652  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "Flash", senderRule, recipientRule)
  1653  	if err != nil {
  1654  		return nil, err
  1655  	}
  1656  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1657  		defer sub.Unsubscribe()
  1658  		for {
  1659  			select {
  1660  			case log := <-logs:
  1661  				// New log arrived, parse the event and forward to the user
  1662  				event := new(UniswapV3PairFlash)
  1663  				if err := _UniswapV3Pair.contract.UnpackLog(event, "Flash", log); err != nil {
  1664  					return err
  1665  				}
  1666  				event.Raw = log
  1667  
  1668  				select {
  1669  				case sink <- event:
  1670  				case err := <-sub.Err():
  1671  					return err
  1672  				case <-quit:
  1673  					return nil
  1674  				}
  1675  			case err := <-sub.Err():
  1676  				return err
  1677  			case <-quit:
  1678  				return nil
  1679  			}
  1680  		}
  1681  	}), nil
  1682  }
  1683  
  1684  // ParseFlash is a log parse operation binding the contract event 0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633.
  1685  //
  1686  // Solidity: event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1)
  1687  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseFlash(log types.Log) (*UniswapV3PairFlash, error) {
  1688  	event := new(UniswapV3PairFlash)
  1689  	if err := _UniswapV3Pair.contract.UnpackLog(event, "Flash", log); err != nil {
  1690  		return nil, err
  1691  	}
  1692  	event.Raw = log
  1693  	return event, nil
  1694  }
  1695  
  1696  // UniswapV3PairIncreaseObservationCardinalityNextIterator is returned from FilterIncreaseObservationCardinalityNext and is used to iterate over the raw logs and unpacked data for IncreaseObservationCardinalityNext events raised by the UniswapV3Pair contract.
  1697  type UniswapV3PairIncreaseObservationCardinalityNextIterator struct {
  1698  	Event *UniswapV3PairIncreaseObservationCardinalityNext // Event containing the contract specifics and raw log
  1699  
  1700  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1701  	event    string              // Event name to use for unpacking event data
  1702  
  1703  	logs chan types.Log        // Log channel receiving the found contract events
  1704  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1705  	done bool                  // Whether the subscription completed delivering logs
  1706  	fail error                 // Occurred error to stop iteration
  1707  }
  1708  
  1709  // Next advances the iterator to the subsequent event, returning whether there
  1710  // are any more events found. In case of a retrieval or parsing error, false is
  1711  // returned and Error() can be queried for the exact failure.
  1712  func (it *UniswapV3PairIncreaseObservationCardinalityNextIterator) Next() bool {
  1713  	// If the iterator failed, stop iterating
  1714  	if it.fail != nil {
  1715  		return false
  1716  	}
  1717  	// If the iterator completed, deliver directly whatever's available
  1718  	if it.done {
  1719  		select {
  1720  		case log := <-it.logs:
  1721  			it.Event = new(UniswapV3PairIncreaseObservationCardinalityNext)
  1722  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1723  				it.fail = err
  1724  				return false
  1725  			}
  1726  			it.Event.Raw = log
  1727  			return true
  1728  
  1729  		default:
  1730  			return false
  1731  		}
  1732  	}
  1733  	// Iterator still in progress, wait for either a data or an error event
  1734  	select {
  1735  	case log := <-it.logs:
  1736  		it.Event = new(UniswapV3PairIncreaseObservationCardinalityNext)
  1737  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1738  			it.fail = err
  1739  			return false
  1740  		}
  1741  		it.Event.Raw = log
  1742  		return true
  1743  
  1744  	case err := <-it.sub.Err():
  1745  		it.done = true
  1746  		it.fail = err
  1747  		return it.Next()
  1748  	}
  1749  }
  1750  
  1751  // Error returns any retrieval or parsing error occurred during filtering.
  1752  func (it *UniswapV3PairIncreaseObservationCardinalityNextIterator) Error() error {
  1753  	return it.fail
  1754  }
  1755  
  1756  // Close terminates the iteration process, releasing any pending underlying
  1757  // resources.
  1758  func (it *UniswapV3PairIncreaseObservationCardinalityNextIterator) Close() error {
  1759  	it.sub.Unsubscribe()
  1760  	return nil
  1761  }
  1762  
  1763  // UniswapV3PairIncreaseObservationCardinalityNext represents a IncreaseObservationCardinalityNext event raised by the UniswapV3Pair contract.
  1764  type UniswapV3PairIncreaseObservationCardinalityNext struct {
  1765  	ObservationCardinalityNextOld uint16
  1766  	ObservationCardinalityNextNew uint16
  1767  	Raw                           types.Log // Blockchain specific contextual infos
  1768  }
  1769  
  1770  // FilterIncreaseObservationCardinalityNext is a free log retrieval operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a.
  1771  //
  1772  // Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew)
  1773  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterIncreaseObservationCardinalityNext(opts *bind.FilterOpts) (*UniswapV3PairIncreaseObservationCardinalityNextIterator, error) {
  1774  
  1775  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "IncreaseObservationCardinalityNext")
  1776  	if err != nil {
  1777  		return nil, err
  1778  	}
  1779  	return &UniswapV3PairIncreaseObservationCardinalityNextIterator{contract: _UniswapV3Pair.contract, event: "IncreaseObservationCardinalityNext", logs: logs, sub: sub}, nil
  1780  }
  1781  
  1782  // WatchIncreaseObservationCardinalityNext is a free log subscription operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a.
  1783  //
  1784  // Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew)
  1785  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchIncreaseObservationCardinalityNext(opts *bind.WatchOpts, sink chan<- *UniswapV3PairIncreaseObservationCardinalityNext) (event.Subscription, error) {
  1786  
  1787  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "IncreaseObservationCardinalityNext")
  1788  	if err != nil {
  1789  		return nil, err
  1790  	}
  1791  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1792  		defer sub.Unsubscribe()
  1793  		for {
  1794  			select {
  1795  			case log := <-logs:
  1796  				// New log arrived, parse the event and forward to the user
  1797  				event := new(UniswapV3PairIncreaseObservationCardinalityNext)
  1798  				if err := _UniswapV3Pair.contract.UnpackLog(event, "IncreaseObservationCardinalityNext", log); err != nil {
  1799  					return err
  1800  				}
  1801  				event.Raw = log
  1802  
  1803  				select {
  1804  				case sink <- event:
  1805  				case err := <-sub.Err():
  1806  					return err
  1807  				case <-quit:
  1808  					return nil
  1809  				}
  1810  			case err := <-sub.Err():
  1811  				return err
  1812  			case <-quit:
  1813  				return nil
  1814  			}
  1815  		}
  1816  	}), nil
  1817  }
  1818  
  1819  // ParseIncreaseObservationCardinalityNext is a log parse operation binding the contract event 0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a.
  1820  //
  1821  // Solidity: event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew)
  1822  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseIncreaseObservationCardinalityNext(log types.Log) (*UniswapV3PairIncreaseObservationCardinalityNext, error) {
  1823  	event := new(UniswapV3PairIncreaseObservationCardinalityNext)
  1824  	if err := _UniswapV3Pair.contract.UnpackLog(event, "IncreaseObservationCardinalityNext", log); err != nil {
  1825  		return nil, err
  1826  	}
  1827  	event.Raw = log
  1828  	return event, nil
  1829  }
  1830  
  1831  // UniswapV3PairInitializeIterator is returned from FilterInitialize and is used to iterate over the raw logs and unpacked data for Initialize events raised by the UniswapV3Pair contract.
  1832  type UniswapV3PairInitializeIterator struct {
  1833  	Event *UniswapV3PairInitialize // Event containing the contract specifics and raw log
  1834  
  1835  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1836  	event    string              // Event name to use for unpacking event data
  1837  
  1838  	logs chan types.Log        // Log channel receiving the found contract events
  1839  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1840  	done bool                  // Whether the subscription completed delivering logs
  1841  	fail error                 // Occurred error to stop iteration
  1842  }
  1843  
  1844  // Next advances the iterator to the subsequent event, returning whether there
  1845  // are any more events found. In case of a retrieval or parsing error, false is
  1846  // returned and Error() can be queried for the exact failure.
  1847  func (it *UniswapV3PairInitializeIterator) Next() bool {
  1848  	// If the iterator failed, stop iterating
  1849  	if it.fail != nil {
  1850  		return false
  1851  	}
  1852  	// If the iterator completed, deliver directly whatever's available
  1853  	if it.done {
  1854  		select {
  1855  		case log := <-it.logs:
  1856  			it.Event = new(UniswapV3PairInitialize)
  1857  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1858  				it.fail = err
  1859  				return false
  1860  			}
  1861  			it.Event.Raw = log
  1862  			return true
  1863  
  1864  		default:
  1865  			return false
  1866  		}
  1867  	}
  1868  	// Iterator still in progress, wait for either a data or an error event
  1869  	select {
  1870  	case log := <-it.logs:
  1871  		it.Event = new(UniswapV3PairInitialize)
  1872  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1873  			it.fail = err
  1874  			return false
  1875  		}
  1876  		it.Event.Raw = log
  1877  		return true
  1878  
  1879  	case err := <-it.sub.Err():
  1880  		it.done = true
  1881  		it.fail = err
  1882  		return it.Next()
  1883  	}
  1884  }
  1885  
  1886  // Error returns any retrieval or parsing error occurred during filtering.
  1887  func (it *UniswapV3PairInitializeIterator) Error() error {
  1888  	return it.fail
  1889  }
  1890  
  1891  // Close terminates the iteration process, releasing any pending underlying
  1892  // resources.
  1893  func (it *UniswapV3PairInitializeIterator) Close() error {
  1894  	it.sub.Unsubscribe()
  1895  	return nil
  1896  }
  1897  
  1898  // UniswapV3PairInitialize represents a Initialize event raised by the UniswapV3Pair contract.
  1899  type UniswapV3PairInitialize struct {
  1900  	SqrtPriceX96 *big.Int
  1901  	Tick         *big.Int
  1902  	Raw          types.Log // Blockchain specific contextual infos
  1903  }
  1904  
  1905  // FilterInitialize is a free log retrieval operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95.
  1906  //
  1907  // Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick)
  1908  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterInitialize(opts *bind.FilterOpts) (*UniswapV3PairInitializeIterator, error) {
  1909  
  1910  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "Initialize")
  1911  	if err != nil {
  1912  		return nil, err
  1913  	}
  1914  	return &UniswapV3PairInitializeIterator{contract: _UniswapV3Pair.contract, event: "Initialize", logs: logs, sub: sub}, nil
  1915  }
  1916  
  1917  // WatchInitialize is a free log subscription operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95.
  1918  //
  1919  // Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick)
  1920  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchInitialize(opts *bind.WatchOpts, sink chan<- *UniswapV3PairInitialize) (event.Subscription, error) {
  1921  
  1922  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "Initialize")
  1923  	if err != nil {
  1924  		return nil, err
  1925  	}
  1926  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1927  		defer sub.Unsubscribe()
  1928  		for {
  1929  			select {
  1930  			case log := <-logs:
  1931  				// New log arrived, parse the event and forward to the user
  1932  				event := new(UniswapV3PairInitialize)
  1933  				if err := _UniswapV3Pair.contract.UnpackLog(event, "Initialize", log); err != nil {
  1934  					return err
  1935  				}
  1936  				event.Raw = log
  1937  
  1938  				select {
  1939  				case sink <- event:
  1940  				case err := <-sub.Err():
  1941  					return err
  1942  				case <-quit:
  1943  					return nil
  1944  				}
  1945  			case err := <-sub.Err():
  1946  				return err
  1947  			case <-quit:
  1948  				return nil
  1949  			}
  1950  		}
  1951  	}), nil
  1952  }
  1953  
  1954  // ParseInitialize is a log parse operation binding the contract event 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95.
  1955  //
  1956  // Solidity: event Initialize(uint160 sqrtPriceX96, int24 tick)
  1957  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseInitialize(log types.Log) (*UniswapV3PairInitialize, error) {
  1958  	event := new(UniswapV3PairInitialize)
  1959  	if err := _UniswapV3Pair.contract.UnpackLog(event, "Initialize", log); err != nil {
  1960  		return nil, err
  1961  	}
  1962  	event.Raw = log
  1963  	return event, nil
  1964  }
  1965  
  1966  // UniswapV3PairMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the UniswapV3Pair contract.
  1967  type UniswapV3PairMintIterator struct {
  1968  	Event *UniswapV3PairMint // Event containing the contract specifics and raw log
  1969  
  1970  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1971  	event    string              // Event name to use for unpacking event data
  1972  
  1973  	logs chan types.Log        // Log channel receiving the found contract events
  1974  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1975  	done bool                  // Whether the subscription completed delivering logs
  1976  	fail error                 // Occurred error to stop iteration
  1977  }
  1978  
  1979  // Next advances the iterator to the subsequent event, returning whether there
  1980  // are any more events found. In case of a retrieval or parsing error, false is
  1981  // returned and Error() can be queried for the exact failure.
  1982  func (it *UniswapV3PairMintIterator) Next() bool {
  1983  	// If the iterator failed, stop iterating
  1984  	if it.fail != nil {
  1985  		return false
  1986  	}
  1987  	// If the iterator completed, deliver directly whatever's available
  1988  	if it.done {
  1989  		select {
  1990  		case log := <-it.logs:
  1991  			it.Event = new(UniswapV3PairMint)
  1992  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1993  				it.fail = err
  1994  				return false
  1995  			}
  1996  			it.Event.Raw = log
  1997  			return true
  1998  
  1999  		default:
  2000  			return false
  2001  		}
  2002  	}
  2003  	// Iterator still in progress, wait for either a data or an error event
  2004  	select {
  2005  	case log := <-it.logs:
  2006  		it.Event = new(UniswapV3PairMint)
  2007  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2008  			it.fail = err
  2009  			return false
  2010  		}
  2011  		it.Event.Raw = log
  2012  		return true
  2013  
  2014  	case err := <-it.sub.Err():
  2015  		it.done = true
  2016  		it.fail = err
  2017  		return it.Next()
  2018  	}
  2019  }
  2020  
  2021  // Error returns any retrieval or parsing error occurred during filtering.
  2022  func (it *UniswapV3PairMintIterator) Error() error {
  2023  	return it.fail
  2024  }
  2025  
  2026  // Close terminates the iteration process, releasing any pending underlying
  2027  // resources.
  2028  func (it *UniswapV3PairMintIterator) Close() error {
  2029  	it.sub.Unsubscribe()
  2030  	return nil
  2031  }
  2032  
  2033  // UniswapV3PairMint represents a Mint event raised by the UniswapV3Pair contract.
  2034  type UniswapV3PairMint struct {
  2035  	Sender    common.Address
  2036  	Owner     common.Address
  2037  	TickLower *big.Int
  2038  	TickUpper *big.Int
  2039  	Amount    *big.Int
  2040  	Amount0   *big.Int
  2041  	Amount1   *big.Int
  2042  	Raw       types.Log // Blockchain specific contextual infos
  2043  }
  2044  
  2045  // FilterMint is a free log retrieval operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde.
  2046  //
  2047  // Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
  2048  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterMint(opts *bind.FilterOpts, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (*UniswapV3PairMintIterator, error) {
  2049  
  2050  	var ownerRule []interface{}
  2051  	for _, ownerItem := range owner {
  2052  		ownerRule = append(ownerRule, ownerItem)
  2053  	}
  2054  	var tickLowerRule []interface{}
  2055  	for _, tickLowerItem := range tickLower {
  2056  		tickLowerRule = append(tickLowerRule, tickLowerItem)
  2057  	}
  2058  	var tickUpperRule []interface{}
  2059  	for _, tickUpperItem := range tickUpper {
  2060  		tickUpperRule = append(tickUpperRule, tickUpperItem)
  2061  	}
  2062  
  2063  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "Mint", ownerRule, tickLowerRule, tickUpperRule)
  2064  	if err != nil {
  2065  		return nil, err
  2066  	}
  2067  	return &UniswapV3PairMintIterator{contract: _UniswapV3Pair.contract, event: "Mint", logs: logs, sub: sub}, nil
  2068  }
  2069  
  2070  // WatchMint is a free log subscription operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde.
  2071  //
  2072  // Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
  2073  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *UniswapV3PairMint, owner []common.Address, tickLower []*big.Int, tickUpper []*big.Int) (event.Subscription, error) {
  2074  
  2075  	var ownerRule []interface{}
  2076  	for _, ownerItem := range owner {
  2077  		ownerRule = append(ownerRule, ownerItem)
  2078  	}
  2079  	var tickLowerRule []interface{}
  2080  	for _, tickLowerItem := range tickLower {
  2081  		tickLowerRule = append(tickLowerRule, tickLowerItem)
  2082  	}
  2083  	var tickUpperRule []interface{}
  2084  	for _, tickUpperItem := range tickUpper {
  2085  		tickUpperRule = append(tickUpperRule, tickUpperItem)
  2086  	}
  2087  
  2088  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "Mint", ownerRule, tickLowerRule, tickUpperRule)
  2089  	if err != nil {
  2090  		return nil, err
  2091  	}
  2092  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2093  		defer sub.Unsubscribe()
  2094  		for {
  2095  			select {
  2096  			case log := <-logs:
  2097  				// New log arrived, parse the event and forward to the user
  2098  				event := new(UniswapV3PairMint)
  2099  				if err := _UniswapV3Pair.contract.UnpackLog(event, "Mint", log); err != nil {
  2100  					return err
  2101  				}
  2102  				event.Raw = log
  2103  
  2104  				select {
  2105  				case sink <- event:
  2106  				case err := <-sub.Err():
  2107  					return err
  2108  				case <-quit:
  2109  					return nil
  2110  				}
  2111  			case err := <-sub.Err():
  2112  				return err
  2113  			case <-quit:
  2114  				return nil
  2115  			}
  2116  		}
  2117  	}), nil
  2118  }
  2119  
  2120  // ParseMint is a log parse operation binding the contract event 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde.
  2121  //
  2122  // Solidity: event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
  2123  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseMint(log types.Log) (*UniswapV3PairMint, error) {
  2124  	event := new(UniswapV3PairMint)
  2125  	if err := _UniswapV3Pair.contract.UnpackLog(event, "Mint", log); err != nil {
  2126  		return nil, err
  2127  	}
  2128  	event.Raw = log
  2129  	return event, nil
  2130  }
  2131  
  2132  // UniswapV3PairSetFeeProtocolIterator is returned from FilterSetFeeProtocol and is used to iterate over the raw logs and unpacked data for SetFeeProtocol events raised by the UniswapV3Pair contract.
  2133  type UniswapV3PairSetFeeProtocolIterator struct {
  2134  	Event *UniswapV3PairSetFeeProtocol // Event containing the contract specifics and raw log
  2135  
  2136  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2137  	event    string              // Event name to use for unpacking event data
  2138  
  2139  	logs chan types.Log        // Log channel receiving the found contract events
  2140  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2141  	done bool                  // Whether the subscription completed delivering logs
  2142  	fail error                 // Occurred error to stop iteration
  2143  }
  2144  
  2145  // Next advances the iterator to the subsequent event, returning whether there
  2146  // are any more events found. In case of a retrieval or parsing error, false is
  2147  // returned and Error() can be queried for the exact failure.
  2148  func (it *UniswapV3PairSetFeeProtocolIterator) Next() bool {
  2149  	// If the iterator failed, stop iterating
  2150  	if it.fail != nil {
  2151  		return false
  2152  	}
  2153  	// If the iterator completed, deliver directly whatever's available
  2154  	if it.done {
  2155  		select {
  2156  		case log := <-it.logs:
  2157  			it.Event = new(UniswapV3PairSetFeeProtocol)
  2158  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2159  				it.fail = err
  2160  				return false
  2161  			}
  2162  			it.Event.Raw = log
  2163  			return true
  2164  
  2165  		default:
  2166  			return false
  2167  		}
  2168  	}
  2169  	// Iterator still in progress, wait for either a data or an error event
  2170  	select {
  2171  	case log := <-it.logs:
  2172  		it.Event = new(UniswapV3PairSetFeeProtocol)
  2173  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2174  			it.fail = err
  2175  			return false
  2176  		}
  2177  		it.Event.Raw = log
  2178  		return true
  2179  
  2180  	case err := <-it.sub.Err():
  2181  		it.done = true
  2182  		it.fail = err
  2183  		return it.Next()
  2184  	}
  2185  }
  2186  
  2187  // Error returns any retrieval or parsing error occurred during filtering.
  2188  func (it *UniswapV3PairSetFeeProtocolIterator) Error() error {
  2189  	return it.fail
  2190  }
  2191  
  2192  // Close terminates the iteration process, releasing any pending underlying
  2193  // resources.
  2194  func (it *UniswapV3PairSetFeeProtocolIterator) Close() error {
  2195  	it.sub.Unsubscribe()
  2196  	return nil
  2197  }
  2198  
  2199  // UniswapV3PairSetFeeProtocol represents a SetFeeProtocol event raised by the UniswapV3Pair contract.
  2200  type UniswapV3PairSetFeeProtocol struct {
  2201  	FeeProtocol0Old uint8
  2202  	FeeProtocol1Old uint8
  2203  	FeeProtocol0New uint8
  2204  	FeeProtocol1New uint8
  2205  	Raw             types.Log // Blockchain specific contextual infos
  2206  }
  2207  
  2208  // FilterSetFeeProtocol is a free log retrieval operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133.
  2209  //
  2210  // Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New)
  2211  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterSetFeeProtocol(opts *bind.FilterOpts) (*UniswapV3PairSetFeeProtocolIterator, error) {
  2212  
  2213  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "SetFeeProtocol")
  2214  	if err != nil {
  2215  		return nil, err
  2216  	}
  2217  	return &UniswapV3PairSetFeeProtocolIterator{contract: _UniswapV3Pair.contract, event: "SetFeeProtocol", logs: logs, sub: sub}, nil
  2218  }
  2219  
  2220  // WatchSetFeeProtocol is a free log subscription operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133.
  2221  //
  2222  // Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New)
  2223  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchSetFeeProtocol(opts *bind.WatchOpts, sink chan<- *UniswapV3PairSetFeeProtocol) (event.Subscription, error) {
  2224  
  2225  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "SetFeeProtocol")
  2226  	if err != nil {
  2227  		return nil, err
  2228  	}
  2229  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2230  		defer sub.Unsubscribe()
  2231  		for {
  2232  			select {
  2233  			case log := <-logs:
  2234  				// New log arrived, parse the event and forward to the user
  2235  				event := new(UniswapV3PairSetFeeProtocol)
  2236  				if err := _UniswapV3Pair.contract.UnpackLog(event, "SetFeeProtocol", log); err != nil {
  2237  					return err
  2238  				}
  2239  				event.Raw = log
  2240  
  2241  				select {
  2242  				case sink <- event:
  2243  				case err := <-sub.Err():
  2244  					return err
  2245  				case <-quit:
  2246  					return nil
  2247  				}
  2248  			case err := <-sub.Err():
  2249  				return err
  2250  			case <-quit:
  2251  				return nil
  2252  			}
  2253  		}
  2254  	}), nil
  2255  }
  2256  
  2257  // ParseSetFeeProtocol is a log parse operation binding the contract event 0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133.
  2258  //
  2259  // Solidity: event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New)
  2260  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseSetFeeProtocol(log types.Log) (*UniswapV3PairSetFeeProtocol, error) {
  2261  	event := new(UniswapV3PairSetFeeProtocol)
  2262  	if err := _UniswapV3Pair.contract.UnpackLog(event, "SetFeeProtocol", log); err != nil {
  2263  		return nil, err
  2264  	}
  2265  	event.Raw = log
  2266  	return event, nil
  2267  }
  2268  
  2269  // UniswapV3PairSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the UniswapV3Pair contract.
  2270  type UniswapV3PairSwapIterator struct {
  2271  	Event *UniswapV3PairSwap // Event containing the contract specifics and raw log
  2272  
  2273  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  2274  	event    string              // Event name to use for unpacking event data
  2275  
  2276  	logs chan types.Log        // Log channel receiving the found contract events
  2277  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  2278  	done bool                  // Whether the subscription completed delivering logs
  2279  	fail error                 // Occurred error to stop iteration
  2280  }
  2281  
  2282  // Next advances the iterator to the subsequent event, returning whether there
  2283  // are any more events found. In case of a retrieval or parsing error, false is
  2284  // returned and Error() can be queried for the exact failure.
  2285  func (it *UniswapV3PairSwapIterator) Next() bool {
  2286  	// If the iterator failed, stop iterating
  2287  	if it.fail != nil {
  2288  		return false
  2289  	}
  2290  	// If the iterator completed, deliver directly whatever's available
  2291  	if it.done {
  2292  		select {
  2293  		case log := <-it.logs:
  2294  			it.Event = new(UniswapV3PairSwap)
  2295  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2296  				it.fail = err
  2297  				return false
  2298  			}
  2299  			it.Event.Raw = log
  2300  			return true
  2301  
  2302  		default:
  2303  			return false
  2304  		}
  2305  	}
  2306  	// Iterator still in progress, wait for either a data or an error event
  2307  	select {
  2308  	case log := <-it.logs:
  2309  		it.Event = new(UniswapV3PairSwap)
  2310  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  2311  			it.fail = err
  2312  			return false
  2313  		}
  2314  		it.Event.Raw = log
  2315  		return true
  2316  
  2317  	case err := <-it.sub.Err():
  2318  		it.done = true
  2319  		it.fail = err
  2320  		return it.Next()
  2321  	}
  2322  }
  2323  
  2324  // Error returns any retrieval or parsing error occurred during filtering.
  2325  func (it *UniswapV3PairSwapIterator) Error() error {
  2326  	return it.fail
  2327  }
  2328  
  2329  // Close terminates the iteration process, releasing any pending underlying
  2330  // resources.
  2331  func (it *UniswapV3PairSwapIterator) Close() error {
  2332  	it.sub.Unsubscribe()
  2333  	return nil
  2334  }
  2335  
  2336  // UniswapV3PairSwap represents a Swap event raised by the UniswapV3Pair contract.
  2337  type UniswapV3PairSwap struct {
  2338  	Sender       common.Address
  2339  	Recipient    common.Address
  2340  	Amount0      *big.Int
  2341  	Amount1      *big.Int
  2342  	SqrtPriceX96 *big.Int
  2343  	Liquidity    *big.Int
  2344  	Tick         *big.Int
  2345  	Raw          types.Log // Blockchain specific contextual infos
  2346  }
  2347  
  2348  // FilterSwap is a free log retrieval operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67.
  2349  //
  2350  // Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
  2351  func (_UniswapV3Pair *UniswapV3PairFilterer) FilterSwap(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*UniswapV3PairSwapIterator, error) {
  2352  
  2353  	var senderRule []interface{}
  2354  	for _, senderItem := range sender {
  2355  		senderRule = append(senderRule, senderItem)
  2356  	}
  2357  	var recipientRule []interface{}
  2358  	for _, recipientItem := range recipient {
  2359  		recipientRule = append(recipientRule, recipientItem)
  2360  	}
  2361  
  2362  	logs, sub, err := _UniswapV3Pair.contract.FilterLogs(opts, "Swap", senderRule, recipientRule)
  2363  	if err != nil {
  2364  		return nil, err
  2365  	}
  2366  	return &UniswapV3PairSwapIterator{contract: _UniswapV3Pair.contract, event: "Swap", logs: logs, sub: sub}, nil
  2367  }
  2368  
  2369  // WatchSwap is a free log subscription operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67.
  2370  //
  2371  // Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
  2372  func (_UniswapV3Pair *UniswapV3PairFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *UniswapV3PairSwap, sender []common.Address, recipient []common.Address) (event.Subscription, error) {
  2373  
  2374  	var senderRule []interface{}
  2375  	for _, senderItem := range sender {
  2376  		senderRule = append(senderRule, senderItem)
  2377  	}
  2378  	var recipientRule []interface{}
  2379  	for _, recipientItem := range recipient {
  2380  		recipientRule = append(recipientRule, recipientItem)
  2381  	}
  2382  
  2383  	logs, sub, err := _UniswapV3Pair.contract.WatchLogs(opts, "Swap", senderRule, recipientRule)
  2384  	if err != nil {
  2385  		return nil, err
  2386  	}
  2387  	return event.NewSubscription(func(quit <-chan struct{}) error {
  2388  		defer sub.Unsubscribe()
  2389  		for {
  2390  			select {
  2391  			case log := <-logs:
  2392  				// New log arrived, parse the event and forward to the user
  2393  				event := new(UniswapV3PairSwap)
  2394  				if err := _UniswapV3Pair.contract.UnpackLog(event, "Swap", log); err != nil {
  2395  					return err
  2396  				}
  2397  				event.Raw = log
  2398  
  2399  				select {
  2400  				case sink <- event:
  2401  				case err := <-sub.Err():
  2402  					return err
  2403  				case <-quit:
  2404  					return nil
  2405  				}
  2406  			case err := <-sub.Err():
  2407  				return err
  2408  			case <-quit:
  2409  				return nil
  2410  			}
  2411  		}
  2412  	}), nil
  2413  }
  2414  
  2415  // ParseSwap is a log parse operation binding the contract event 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67.
  2416  //
  2417  // Solidity: event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
  2418  func (_UniswapV3Pair *UniswapV3PairFilterer) ParseSwap(log types.Log) (*UniswapV3PairSwap, error) {
  2419  	event := new(UniswapV3PairSwap)
  2420  	if err := _UniswapV3Pair.contract.UnpackLog(event, "Swap", log); err != nil {
  2421  		return nil, err
  2422  	}
  2423  	event.Raw = log
  2424  	return event, nil
  2425  }