611 lines
30 KiB
Go
611 lines
30 KiB
Go
// Code generated - DO NOT EDIT.
|
|
// This file is a generated binding and any manual changes will be lost.
|
|
|
|
package tokens
|
|
|
|
import (
|
|
"errors"
|
|
"math/big"
|
|
"strings"
|
|
|
|
ethereum "github.com/ethereum/go-ethereum"
|
|
"github.com/ethereum/go-ethereum/accounts/abi"
|
|
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"github.com/ethereum/go-ethereum/core/types"
|
|
"github.com/ethereum/go-ethereum/event"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var (
|
|
_ = errors.New
|
|
_ = big.NewInt
|
|
_ = strings.NewReader
|
|
_ = ethereum.NotFound
|
|
_ = bind.Bind
|
|
_ = common.Big1
|
|
_ = types.BloomLookup
|
|
_ = event.NewSubscription
|
|
_ = abi.ConvertType
|
|
)
|
|
|
|
// IUniswapV3PoolStateMetaData contains all meta data concerning the IUniswapV3PoolState contract.
|
|
var IUniswapV3PoolStateMetaData = &bind.MetaData{
|
|
ABI: "[{\"type\":\"function\",\"name\":\"feeGrowthGlobal0X128\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feeGrowthGlobal1X128\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"liquidity\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint128\",\"internalType\":\"uint128\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"observations\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"blockTimestamp\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"tickCumulative\",\"type\":\"int56\",\"internalType\":\"int56\"},{\"name\":\"secondsPerLiquidityCumulativeX128\",\"type\":\"uint160\",\"internalType\":\"uint160\"},{\"name\":\"initialized\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"positions\",\"inputs\":[{\"name\":\"key\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"_liquidity\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"feeGrowthInside0LastX128\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"feeGrowthInside1LastX128\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"tokensOwed0\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"tokensOwed1\",\"type\":\"uint128\",\"internalType\":\"uint128\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"protocolFees\",\"inputs\":[],\"outputs\":[{\"name\":\"token0\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"token1\",\"type\":\"uint128\",\"internalType\":\"uint128\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"slot0\",\"inputs\":[],\"outputs\":[{\"name\":\"sqrtPriceX96\",\"type\":\"uint160\",\"internalType\":\"uint160\"},{\"name\":\"tick\",\"type\":\"int24\",\"internalType\":\"int24\"},{\"name\":\"observationIndex\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"observationCardinality\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"observationCardinalityNext\",\"type\":\"uint16\",\"internalType\":\"uint16\"},{\"name\":\"feeProtocol\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"unlocked\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"tickBitmap\",\"inputs\":[{\"name\":\"wordPosition\",\"type\":\"int16\",\"internalType\":\"int16\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ticks\",\"inputs\":[{\"name\":\"tick\",\"type\":\"int24\",\"internalType\":\"int24\"}],\"outputs\":[{\"name\":\"liquidityGross\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"liquidityNet\",\"type\":\"int128\",\"internalType\":\"int128\"},{\"name\":\"feeGrowthOutside0X128\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"feeGrowthOutside1X128\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"tickCumulativeOutside\",\"type\":\"int56\",\"internalType\":\"int56\"},{\"name\":\"secondsPerLiquidityOutsideX128\",\"type\":\"uint160\",\"internalType\":\"uint160\"},{\"name\":\"secondsOutside\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"initialized\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"}]",
|
|
}
|
|
|
|
// IUniswapV3PoolStateABI is the input ABI used to generate the binding from.
|
|
// Deprecated: Use IUniswapV3PoolStateMetaData.ABI instead.
|
|
var IUniswapV3PoolStateABI = IUniswapV3PoolStateMetaData.ABI
|
|
|
|
// IUniswapV3PoolState is an auto generated Go binding around an Ethereum contract.
|
|
type IUniswapV3PoolState struct {
|
|
IUniswapV3PoolStateCaller // Read-only binding to the contract
|
|
IUniswapV3PoolStateTransactor // Write-only binding to the contract
|
|
IUniswapV3PoolStateFilterer // Log filterer for contract events
|
|
}
|
|
|
|
// IUniswapV3PoolStateCaller is an auto generated read-only Go binding around an Ethereum contract.
|
|
type IUniswapV3PoolStateCaller struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IUniswapV3PoolStateTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
|
type IUniswapV3PoolStateTransactor struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IUniswapV3PoolStateFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
|
type IUniswapV3PoolStateFilterer struct {
|
|
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
|
}
|
|
|
|
// IUniswapV3PoolStateSession is an auto generated Go binding around an Ethereum contract,
|
|
// with pre-set call and transact options.
|
|
type IUniswapV3PoolStateSession struct {
|
|
Contract *IUniswapV3PoolState // Generic contract binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IUniswapV3PoolStateCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
|
// with pre-set call options.
|
|
type IUniswapV3PoolStateCallerSession struct {
|
|
Contract *IUniswapV3PoolStateCaller // Generic contract caller binding to set the session for
|
|
CallOpts bind.CallOpts // Call options to use throughout this session
|
|
}
|
|
|
|
// IUniswapV3PoolStateTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
|
// with pre-set transact options.
|
|
type IUniswapV3PoolStateTransactorSession struct {
|
|
Contract *IUniswapV3PoolStateTransactor // Generic contract transactor binding to set the session for
|
|
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
|
}
|
|
|
|
// IUniswapV3PoolStateRaw is an auto generated low-level Go binding around an Ethereum contract.
|
|
type IUniswapV3PoolStateRaw struct {
|
|
Contract *IUniswapV3PoolState // Generic contract binding to access the raw methods on
|
|
}
|
|
|
|
// IUniswapV3PoolStateCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
|
type IUniswapV3PoolStateCallerRaw struct {
|
|
Contract *IUniswapV3PoolStateCaller // Generic read-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// IUniswapV3PoolStateTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
|
type IUniswapV3PoolStateTransactorRaw struct {
|
|
Contract *IUniswapV3PoolStateTransactor // Generic write-only contract binding to access the raw methods on
|
|
}
|
|
|
|
// NewIUniswapV3PoolState creates a new instance of IUniswapV3PoolState, bound to a specific deployed contract.
|
|
func NewIUniswapV3PoolState(address common.Address, backend bind.ContractBackend) (*IUniswapV3PoolState, error) {
|
|
contract, err := bindIUniswapV3PoolState(address, backend, backend, backend)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IUniswapV3PoolState{IUniswapV3PoolStateCaller: IUniswapV3PoolStateCaller{contract: contract}, IUniswapV3PoolStateTransactor: IUniswapV3PoolStateTransactor{contract: contract}, IUniswapV3PoolStateFilterer: IUniswapV3PoolStateFilterer{contract: contract}}, nil
|
|
}
|
|
|
|
// NewIUniswapV3PoolStateCaller creates a new read-only instance of IUniswapV3PoolState, bound to a specific deployed contract.
|
|
func NewIUniswapV3PoolStateCaller(address common.Address, caller bind.ContractCaller) (*IUniswapV3PoolStateCaller, error) {
|
|
contract, err := bindIUniswapV3PoolState(address, caller, nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IUniswapV3PoolStateCaller{contract: contract}, nil
|
|
}
|
|
|
|
// NewIUniswapV3PoolStateTransactor creates a new write-only instance of IUniswapV3PoolState, bound to a specific deployed contract.
|
|
func NewIUniswapV3PoolStateTransactor(address common.Address, transactor bind.ContractTransactor) (*IUniswapV3PoolStateTransactor, error) {
|
|
contract, err := bindIUniswapV3PoolState(address, nil, transactor, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IUniswapV3PoolStateTransactor{contract: contract}, nil
|
|
}
|
|
|
|
// NewIUniswapV3PoolStateFilterer creates a new log filterer instance of IUniswapV3PoolState, bound to a specific deployed contract.
|
|
func NewIUniswapV3PoolStateFilterer(address common.Address, filterer bind.ContractFilterer) (*IUniswapV3PoolStateFilterer, error) {
|
|
contract, err := bindIUniswapV3PoolState(address, nil, nil, filterer)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &IUniswapV3PoolStateFilterer{contract: contract}, nil
|
|
}
|
|
|
|
// bindIUniswapV3PoolState binds a generic wrapper to an already deployed contract.
|
|
func bindIUniswapV3PoolState(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
|
parsed, err := IUniswapV3PoolStateMetaData.GetAbi()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
|
|
}
|
|
|
|
// Call invokes the (constant) contract method with params as input values and
|
|
// sets the output to result. The result type might be a single field for simple
|
|
// returns, a slice of interfaces for anonymous returns and a struct for named
|
|
// returns.
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IUniswapV3PoolState.Contract.IUniswapV3PoolStateCaller.contract.Call(opts, result, method, params...)
|
|
}
|
|
|
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
|
// its default method if one is available.
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IUniswapV3PoolState.Contract.IUniswapV3PoolStateTransactor.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IUniswapV3PoolState.Contract.IUniswapV3PoolStateTransactor.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// Call invokes the (constant) contract method with params as input values and
|
|
// sets the output to result. The result type might be a single field for simple
|
|
// returns, a slice of interfaces for anonymous returns and a struct for named
|
|
// returns.
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
|
return _IUniswapV3PoolState.Contract.contract.Call(opts, result, method, params...)
|
|
}
|
|
|
|
// Transfer initiates a plain transaction to move funds to the contract, calling
|
|
// its default method if one is available.
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
|
return _IUniswapV3PoolState.Contract.contract.Transfer(opts)
|
|
}
|
|
|
|
// Transact invokes the (paid) contract method with params as input values.
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
|
return _IUniswapV3PoolState.Contract.contract.Transact(opts, method, params...)
|
|
}
|
|
|
|
// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399.
|
|
//
|
|
// Solidity: function feeGrowthGlobal0X128() view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) FeeGrowthGlobal0X128(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "feeGrowthGlobal0X128")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399.
|
|
//
|
|
// Solidity: function feeGrowthGlobal0X128() view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) FeeGrowthGlobal0X128() (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.FeeGrowthGlobal0X128(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// FeeGrowthGlobal0X128 is a free data retrieval call binding the contract method 0xf3058399.
|
|
//
|
|
// Solidity: function feeGrowthGlobal0X128() view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) FeeGrowthGlobal0X128() (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.FeeGrowthGlobal0X128(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319.
|
|
//
|
|
// Solidity: function feeGrowthGlobal1X128() view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) FeeGrowthGlobal1X128(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "feeGrowthGlobal1X128")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319.
|
|
//
|
|
// Solidity: function feeGrowthGlobal1X128() view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) FeeGrowthGlobal1X128() (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.FeeGrowthGlobal1X128(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// FeeGrowthGlobal1X128 is a free data retrieval call binding the contract method 0x46141319.
|
|
//
|
|
// Solidity: function feeGrowthGlobal1X128() view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) FeeGrowthGlobal1X128() (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.FeeGrowthGlobal1X128(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// Liquidity is a free data retrieval call binding the contract method 0x1a686502.
|
|
//
|
|
// Solidity: function liquidity() view returns(uint128)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Liquidity(opts *bind.CallOpts) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "liquidity")
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// Liquidity is a free data retrieval call binding the contract method 0x1a686502.
|
|
//
|
|
// Solidity: function liquidity() view returns(uint128)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Liquidity() (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.Liquidity(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// Liquidity is a free data retrieval call binding the contract method 0x1a686502.
|
|
//
|
|
// Solidity: function liquidity() view returns(uint128)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Liquidity() (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.Liquidity(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// Observations is a free data retrieval call binding the contract method 0x252c09d7.
|
|
//
|
|
// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Observations(opts *bind.CallOpts, index *big.Int) (struct {
|
|
BlockTimestamp uint32
|
|
TickCumulative *big.Int
|
|
SecondsPerLiquidityCumulativeX128 *big.Int
|
|
Initialized bool
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "observations", index)
|
|
|
|
outstruct := new(struct {
|
|
BlockTimestamp uint32
|
|
TickCumulative *big.Int
|
|
SecondsPerLiquidityCumulativeX128 *big.Int
|
|
Initialized bool
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.BlockTimestamp = *abi.ConvertType(out[0], new(uint32)).(*uint32)
|
|
outstruct.TickCumulative = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.SecondsPerLiquidityCumulativeX128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
|
|
outstruct.Initialized = *abi.ConvertType(out[3], new(bool)).(*bool)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// Observations is a free data retrieval call binding the contract method 0x252c09d7.
|
|
//
|
|
// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Observations(index *big.Int) (struct {
|
|
BlockTimestamp uint32
|
|
TickCumulative *big.Int
|
|
SecondsPerLiquidityCumulativeX128 *big.Int
|
|
Initialized bool
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Observations(&_IUniswapV3PoolState.CallOpts, index)
|
|
}
|
|
|
|
// Observations is a free data retrieval call binding the contract method 0x252c09d7.
|
|
//
|
|
// Solidity: function observations(uint256 index) view returns(uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Observations(index *big.Int) (struct {
|
|
BlockTimestamp uint32
|
|
TickCumulative *big.Int
|
|
SecondsPerLiquidityCumulativeX128 *big.Int
|
|
Initialized bool
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Observations(&_IUniswapV3PoolState.CallOpts, index)
|
|
}
|
|
|
|
// Positions is a free data retrieval call binding the contract method 0x514ea4bf.
|
|
//
|
|
// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Positions(opts *bind.CallOpts, key [32]byte) (struct {
|
|
Liquidity *big.Int
|
|
FeeGrowthInside0LastX128 *big.Int
|
|
FeeGrowthInside1LastX128 *big.Int
|
|
TokensOwed0 *big.Int
|
|
TokensOwed1 *big.Int
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "positions", key)
|
|
|
|
outstruct := new(struct {
|
|
Liquidity *big.Int
|
|
FeeGrowthInside0LastX128 *big.Int
|
|
FeeGrowthInside1LastX128 *big.Int
|
|
TokensOwed0 *big.Int
|
|
TokensOwed1 *big.Int
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Liquidity = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.FeeGrowthInside0LastX128 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.FeeGrowthInside1LastX128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
|
|
outstruct.TokensOwed0 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
|
|
outstruct.TokensOwed1 = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// Positions is a free data retrieval call binding the contract method 0x514ea4bf.
|
|
//
|
|
// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Positions(key [32]byte) (struct {
|
|
Liquidity *big.Int
|
|
FeeGrowthInside0LastX128 *big.Int
|
|
FeeGrowthInside1LastX128 *big.Int
|
|
TokensOwed0 *big.Int
|
|
TokensOwed1 *big.Int
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Positions(&_IUniswapV3PoolState.CallOpts, key)
|
|
}
|
|
|
|
// Positions is a free data retrieval call binding the contract method 0x514ea4bf.
|
|
//
|
|
// Solidity: function positions(bytes32 key) view returns(uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Positions(key [32]byte) (struct {
|
|
Liquidity *big.Int
|
|
FeeGrowthInside0LastX128 *big.Int
|
|
FeeGrowthInside1LastX128 *big.Int
|
|
TokensOwed0 *big.Int
|
|
TokensOwed1 *big.Int
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Positions(&_IUniswapV3PoolState.CallOpts, key)
|
|
}
|
|
|
|
// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b.
|
|
//
|
|
// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) ProtocolFees(opts *bind.CallOpts) (struct {
|
|
Token0 *big.Int
|
|
Token1 *big.Int
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "protocolFees")
|
|
|
|
outstruct := new(struct {
|
|
Token0 *big.Int
|
|
Token1 *big.Int
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.Token0 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.Token1 = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b.
|
|
//
|
|
// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) ProtocolFees() (struct {
|
|
Token0 *big.Int
|
|
Token1 *big.Int
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.ProtocolFees(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// ProtocolFees is a free data retrieval call binding the contract method 0x1ad8b03b.
|
|
//
|
|
// Solidity: function protocolFees() view returns(uint128 token0, uint128 token1)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) ProtocolFees() (struct {
|
|
Token0 *big.Int
|
|
Token1 *big.Int
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.ProtocolFees(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd.
|
|
//
|
|
// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Slot0(opts *bind.CallOpts) (struct {
|
|
SqrtPriceX96 *big.Int
|
|
Tick *big.Int
|
|
ObservationIndex uint16
|
|
ObservationCardinality uint16
|
|
ObservationCardinalityNext uint16
|
|
FeeProtocol uint8
|
|
Unlocked bool
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "slot0")
|
|
|
|
outstruct := new(struct {
|
|
SqrtPriceX96 *big.Int
|
|
Tick *big.Int
|
|
ObservationIndex uint16
|
|
ObservationCardinality uint16
|
|
ObservationCardinalityNext uint16
|
|
FeeProtocol uint8
|
|
Unlocked bool
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.SqrtPriceX96 = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.Tick = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.ObservationIndex = *abi.ConvertType(out[2], new(uint16)).(*uint16)
|
|
outstruct.ObservationCardinality = *abi.ConvertType(out[3], new(uint16)).(*uint16)
|
|
outstruct.ObservationCardinalityNext = *abi.ConvertType(out[4], new(uint16)).(*uint16)
|
|
outstruct.FeeProtocol = *abi.ConvertType(out[5], new(uint8)).(*uint8)
|
|
outstruct.Unlocked = *abi.ConvertType(out[6], new(bool)).(*bool)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd.
|
|
//
|
|
// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Slot0() (struct {
|
|
SqrtPriceX96 *big.Int
|
|
Tick *big.Int
|
|
ObservationIndex uint16
|
|
ObservationCardinality uint16
|
|
ObservationCardinalityNext uint16
|
|
FeeProtocol uint8
|
|
Unlocked bool
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Slot0(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// Slot0 is a free data retrieval call binding the contract method 0x3850c7bd.
|
|
//
|
|
// Solidity: function slot0() view returns(uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Slot0() (struct {
|
|
SqrtPriceX96 *big.Int
|
|
Tick *big.Int
|
|
ObservationIndex uint16
|
|
ObservationCardinality uint16
|
|
ObservationCardinalityNext uint16
|
|
FeeProtocol uint8
|
|
Unlocked bool
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Slot0(&_IUniswapV3PoolState.CallOpts)
|
|
}
|
|
|
|
// TickBitmap is a free data retrieval call binding the contract method 0x5339c296.
|
|
//
|
|
// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) TickBitmap(opts *bind.CallOpts, wordPosition int16) (*big.Int, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "tickBitmap", wordPosition)
|
|
|
|
if err != nil {
|
|
return *new(*big.Int), err
|
|
}
|
|
|
|
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
|
|
return out0, err
|
|
|
|
}
|
|
|
|
// TickBitmap is a free data retrieval call binding the contract method 0x5339c296.
|
|
//
|
|
// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) TickBitmap(wordPosition int16) (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.TickBitmap(&_IUniswapV3PoolState.CallOpts, wordPosition)
|
|
}
|
|
|
|
// TickBitmap is a free data retrieval call binding the contract method 0x5339c296.
|
|
//
|
|
// Solidity: function tickBitmap(int16 wordPosition) view returns(uint256)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) TickBitmap(wordPosition int16) (*big.Int, error) {
|
|
return _IUniswapV3PoolState.Contract.TickBitmap(&_IUniswapV3PoolState.CallOpts, wordPosition)
|
|
}
|
|
|
|
// Ticks is a free data retrieval call binding the contract method 0xf30dba93.
|
|
//
|
|
// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCaller) Ticks(opts *bind.CallOpts, tick *big.Int) (struct {
|
|
LiquidityGross *big.Int
|
|
LiquidityNet *big.Int
|
|
FeeGrowthOutside0X128 *big.Int
|
|
FeeGrowthOutside1X128 *big.Int
|
|
TickCumulativeOutside *big.Int
|
|
SecondsPerLiquidityOutsideX128 *big.Int
|
|
SecondsOutside uint32
|
|
Initialized bool
|
|
}, error) {
|
|
var out []interface{}
|
|
err := _IUniswapV3PoolState.contract.Call(opts, &out, "ticks", tick)
|
|
|
|
outstruct := new(struct {
|
|
LiquidityGross *big.Int
|
|
LiquidityNet *big.Int
|
|
FeeGrowthOutside0X128 *big.Int
|
|
FeeGrowthOutside1X128 *big.Int
|
|
TickCumulativeOutside *big.Int
|
|
SecondsPerLiquidityOutsideX128 *big.Int
|
|
SecondsOutside uint32
|
|
Initialized bool
|
|
})
|
|
if err != nil {
|
|
return *outstruct, err
|
|
}
|
|
|
|
outstruct.LiquidityGross = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
|
|
outstruct.LiquidityNet = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
|
|
outstruct.FeeGrowthOutside0X128 = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
|
|
outstruct.FeeGrowthOutside1X128 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
|
|
outstruct.TickCumulativeOutside = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
|
|
outstruct.SecondsPerLiquidityOutsideX128 = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int)
|
|
outstruct.SecondsOutside = *abi.ConvertType(out[6], new(uint32)).(*uint32)
|
|
outstruct.Initialized = *abi.ConvertType(out[7], new(bool)).(*bool)
|
|
|
|
return *outstruct, err
|
|
|
|
}
|
|
|
|
// Ticks is a free data retrieval call binding the contract method 0xf30dba93.
|
|
//
|
|
// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateSession) Ticks(tick *big.Int) (struct {
|
|
LiquidityGross *big.Int
|
|
LiquidityNet *big.Int
|
|
FeeGrowthOutside0X128 *big.Int
|
|
FeeGrowthOutside1X128 *big.Int
|
|
TickCumulativeOutside *big.Int
|
|
SecondsPerLiquidityOutsideX128 *big.Int
|
|
SecondsOutside uint32
|
|
Initialized bool
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Ticks(&_IUniswapV3PoolState.CallOpts, tick)
|
|
}
|
|
|
|
// Ticks is a free data retrieval call binding the contract method 0xf30dba93.
|
|
//
|
|
// Solidity: function ticks(int24 tick) view returns(uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized)
|
|
func (_IUniswapV3PoolState *IUniswapV3PoolStateCallerSession) Ticks(tick *big.Int) (struct {
|
|
LiquidityGross *big.Int
|
|
LiquidityNet *big.Int
|
|
FeeGrowthOutside0X128 *big.Int
|
|
FeeGrowthOutside1X128 *big.Int
|
|
TickCumulativeOutside *big.Int
|
|
SecondsPerLiquidityOutsideX128 *big.Int
|
|
SecondsOutside uint32
|
|
Initialized bool
|
|
}, error) {
|
|
return _IUniswapV3PoolState.Contract.Ticks(&_IUniswapV3PoolState.CallOpts, tick)
|
|
}
|