pool

package
v1.4.478 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PoolABI = PoolMetaData.ABI

PoolABI is the input ABI used to generate the binding from. Deprecated: Use PoolMetaData.ABI instead.

View Source
var PoolMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"name\":\"AddLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"reserveA\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"reserveB\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"mergeId\",\"type\":\"uint128\"}],\"name\":\"BinMerged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"int128\",\"name\":\"previousTick\",\"type\":\"int128\"},{\"indexed\":false,\"internalType\":\"int128\",\"name\":\"newTick\",\"type\":\"int128\"}],\"name\":\"BinMoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"maxRecursion\",\"type\":\"uint32\"}],\"name\":\"MigrateBinsUpStack\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTokenA\",\"type\":\"bool\"}],\"name\":\"ProtocolFeeCollected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"name\":\"RemoveLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"}],\"name\":\"SetProtocolFeeRatio\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"tokenAIn\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"exactOutput\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int32\",\"name\":\"activeTick\",\"type\":\"int32\"}],\"name\":\"Swap\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fromTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"toTokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structIPool.RemoveLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"name\":\"TransferLiquidity\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"pos\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isDelta\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"}],\"internalType\":\"structIPool.AddLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenBAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpToken\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"binBalanceA\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"binBalanceB\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"tick\",\"type\":\"int32\"}],\"name\":\"binMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"tick\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"kind\",\"type\":\"uint256\"}],\"name\":\"binPositions\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contractIFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"}],\"name\":\"getBin\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"reserveA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"reserveB\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"mergeBinBalance\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"mergeId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"totalSupply\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"}],\"internalType\":\"structIPool.BinState\",\"name\":\"bin\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentTwa\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"int32\",\"name\":\"activeTick\",\"type\":\"int32\"},{\"internalType\":\"uint8\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"binCounter\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"protocolFeeRatio\",\"type\":\"uint64\"}],\"internalType\":\"structIPool.State\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTwa\",\"outputs\":[{\"components\":[{\"internalType\":\"int96\",\"name\":\"twa\",\"type\":\"int96\"},{\"internalType\":\"int96\",\"name\":\"value\",\"type\":\"int96\"},{\"internalType\":\"uint64\",\"name\":\"lastTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structIPool.TwaState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"maxRecursion\",\"type\":\"uint32\"}],\"name\":\"migrateBinUpStack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"structIPool.RemoveLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokenBOut\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"deltaA\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"deltaB\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"deltaLpBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint8\",\"name\":\"kind\",\"type\":\"uint8\"},{\"internalType\":\"int32\",\"name\":\"lowerTick\",\"type\":\"int32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"internalType\":\"structIPool.BinDelta[]\",\"name\":\"binDeltas\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"tokenAIn\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"exactOutput\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"sqrtPriceLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"swap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tickSpacing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenA\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenAScale\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenB\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenBScale\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"fromTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"toTokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"binId\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"internalType\":\"structIPool.RemoveLiquidityParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"name\":\"transferLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

PoolMetaData contains all meta data concerning the Pool contract.

Functions

This section is empty.

Types

type IPoolAddLiquidityParams

type IPoolAddLiquidityParams struct {
	Kind    uint8
	Pos     int32
	IsDelta bool
	DeltaA  *big.Int
	DeltaB  *big.Int
}

IPoolAddLiquidityParams is an auto generated low-level Go binding around an user-defined struct.

type IPoolBinDelta

type IPoolBinDelta struct {
	DeltaA         *big.Int
	DeltaB         *big.Int
	DeltaLpBalance *big.Int
	BinId          *big.Int
	Kind           uint8
	LowerTick      int32
	IsActive       bool
}

IPoolBinDelta is an auto generated low-level Go binding around an user-defined struct.

type IPoolBinState

type IPoolBinState struct {
	ReserveA        *big.Int
	ReserveB        *big.Int
	MergeBinBalance *big.Int
	MergeId         *big.Int
	TotalSupply     *big.Int
	Kind            uint8
	LowerTick       int32
}

IPoolBinState is an auto generated low-level Go binding around an user-defined struct.

type IPoolRemoveLiquidityParams

type IPoolRemoveLiquidityParams struct {
	BinId  *big.Int
	Amount *big.Int
}

IPoolRemoveLiquidityParams is an auto generated low-level Go binding around an user-defined struct.

type IPoolState

type IPoolState struct {
	ActiveTick       int32
	Status           uint8
	BinCounter       *big.Int
	ProtocolFeeRatio uint64
}

IPoolState is an auto generated low-level Go binding around an user-defined struct.

type IPoolTwaState

type IPoolTwaState struct {
	Twa           *big.Int
	Value         *big.Int
	LastTimestamp uint64
}

IPoolTwaState is an auto generated low-level Go binding around an user-defined struct.

type Pool

type Pool struct {
	PoolCaller     // Read-only binding to the contract
	PoolTransactor // Write-only binding to the contract
	PoolFilterer   // Log filterer for contract events
}

Pool is an auto generated Go binding around an Ethereum contract.

func NewPool

func NewPool(address common.Address, backend bind.ContractBackend) (*Pool, error)

NewPool creates a new instance of Pool, bound to a specific deployed contract.

type PoolAddLiquidity

type PoolAddLiquidity struct {
	Sender    common.Address
	TokenId   *big.Int
	BinDeltas []IPoolBinDelta
	Raw       types.Log // Blockchain specific contextual infos
}

PoolAddLiquidity represents a AddLiquidity event raised by the Pool contract.

type PoolAddLiquidityIterator

type PoolAddLiquidityIterator struct {
	Event *PoolAddLiquidity // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolAddLiquidityIterator is returned from FilterAddLiquidity and is used to iterate over the raw logs and unpacked data for AddLiquidity events raised by the Pool contract.

func (*PoolAddLiquidityIterator) Close

func (it *PoolAddLiquidityIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolAddLiquidityIterator) Error

func (it *PoolAddLiquidityIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolAddLiquidityIterator) Next

func (it *PoolAddLiquidityIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolBinMerged

type PoolBinMerged struct {
	BinId    *big.Int
	ReserveA *big.Int
	ReserveB *big.Int
	MergeId  *big.Int
	Raw      types.Log // Blockchain specific contextual infos
}

PoolBinMerged represents a BinMerged event raised by the Pool contract.

type PoolBinMergedIterator

type PoolBinMergedIterator struct {
	Event *PoolBinMerged // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolBinMergedIterator is returned from FilterBinMerged and is used to iterate over the raw logs and unpacked data for BinMerged events raised by the Pool contract.

func (*PoolBinMergedIterator) Close

func (it *PoolBinMergedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolBinMergedIterator) Error

func (it *PoolBinMergedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolBinMergedIterator) Next

func (it *PoolBinMergedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolBinMoved

type PoolBinMoved struct {
	BinId        *big.Int
	PreviousTick *big.Int
	NewTick      *big.Int
	Raw          types.Log // Blockchain specific contextual infos
}

PoolBinMoved represents a BinMoved event raised by the Pool contract.

type PoolBinMovedIterator

type PoolBinMovedIterator struct {
	Event *PoolBinMoved // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolBinMovedIterator is returned from FilterBinMoved and is used to iterate over the raw logs and unpacked data for BinMoved events raised by the Pool contract.

func (*PoolBinMovedIterator) Close

func (it *PoolBinMovedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolBinMovedIterator) Error

func (it *PoolBinMovedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolBinMovedIterator) Next

func (it *PoolBinMovedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolCaller

type PoolCaller struct {
	// contains filtered or unexported fields
}

PoolCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewPoolCaller

func NewPoolCaller(address common.Address, caller bind.ContractCaller) (*PoolCaller, error)

NewPoolCaller creates a new read-only instance of Pool, bound to a specific deployed contract.

func (*PoolCaller) BalanceOf

func (_Pool *PoolCaller) BalanceOf(opts *bind.CallOpts, tokenId *big.Int, binId *big.Int) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x6da3bf8b.

Solidity: function balanceOf(uint256 tokenId, uint128 binId) view returns(uint256 lpToken)

func (*PoolCaller) BinBalanceA

func (_Pool *PoolCaller) BinBalanceA(opts *bind.CallOpts) (*big.Int, error)

BinBalanceA is a free data retrieval call binding the contract method 0x75bbbd73.

Solidity: function binBalanceA() view returns(uint128)

func (*PoolCaller) BinBalanceB

func (_Pool *PoolCaller) BinBalanceB(opts *bind.CallOpts) (*big.Int, error)

BinBalanceB is a free data retrieval call binding the contract method 0xfa158509.

Solidity: function binBalanceB() view returns(uint128)

func (*PoolCaller) BinMap

func (_Pool *PoolCaller) BinMap(opts *bind.CallOpts, tick int32) (*big.Int, error)

BinMap is a free data retrieval call binding the contract method 0xa2ba172f.

Solidity: function binMap(int32 tick) view returns(uint256)

func (*PoolCaller) BinPositions

func (_Pool *PoolCaller) BinPositions(opts *bind.CallOpts, tick int32, kind *big.Int) (*big.Int, error)

BinPositions is a free data retrieval call binding the contract method 0x83f9c632.

Solidity: function binPositions(int32 tick, uint256 kind) view returns(uint128)

func (*PoolCaller) Factory

func (_Pool *PoolCaller) Factory(opts *bind.CallOpts) (common.Address, error)

Factory is a free data retrieval call binding the contract method 0xc45a0155.

Solidity: function factory() view returns(address)

func (*PoolCaller) Fee

func (_Pool *PoolCaller) Fee(opts *bind.CallOpts) (*big.Int, error)

Fee is a free data retrieval call binding the contract method 0xddca3f43.

Solidity: function fee() view returns(uint256)

func (*PoolCaller) GetBin

func (_Pool *PoolCaller) GetBin(opts *bind.CallOpts, binId *big.Int) (IPoolBinState, error)

GetBin is a free data retrieval call binding the contract method 0x44a185bb.

Solidity: function getBin(uint128 binId) view returns((uint128,uint128,uint128,uint128,uint128,uint8,int32) bin)

func (*PoolCaller) GetCurrentTwa

func (_Pool *PoolCaller) GetCurrentTwa(opts *bind.CallOpts) (*big.Int, error)

GetCurrentTwa is a free data retrieval call binding the contract method 0xd3d3861a.

Solidity: function getCurrentTwa() view returns(int256)

func (*PoolCaller) GetState

func (_Pool *PoolCaller) GetState(opts *bind.CallOpts) (IPoolState, error)

GetState is a free data retrieval call binding the contract method 0x1865c57d.

Solidity: function getState() view returns((int32,uint8,uint128,uint64))

func (*PoolCaller) GetTwa

func (_Pool *PoolCaller) GetTwa(opts *bind.CallOpts) (IPoolTwaState, error)

GetTwa is a free data retrieval call binding the contract method 0xa4ed496a.

Solidity: function getTwa() view returns((int96,int96,uint64))

func (*PoolCaller) TickSpacing

func (_Pool *PoolCaller) TickSpacing(opts *bind.CallOpts) (*big.Int, error)

TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.

Solidity: function tickSpacing() view returns(uint256)

func (*PoolCaller) TokenA

func (_Pool *PoolCaller) TokenA(opts *bind.CallOpts) (common.Address, error)

TokenA is a free data retrieval call binding the contract method 0x0fc63d10.

Solidity: function tokenA() view returns(address)

func (*PoolCaller) TokenAScale

func (_Pool *PoolCaller) TokenAScale(opts *bind.CallOpts) (*big.Int, error)

TokenAScale is a free data retrieval call binding the contract method 0x3ab72c10.

Solidity: function tokenAScale() view returns(uint256)

func (*PoolCaller) TokenB

func (_Pool *PoolCaller) TokenB(opts *bind.CallOpts) (common.Address, error)

TokenB is a free data retrieval call binding the contract method 0x5f64b55b.

Solidity: function tokenB() view returns(address)

func (*PoolCaller) TokenBScale

func (_Pool *PoolCaller) TokenBScale(opts *bind.CallOpts) (*big.Int, error)

TokenBScale is a free data retrieval call binding the contract method 0x21272d4c.

Solidity: function tokenBScale() view returns(uint256)

type PoolCallerRaw

type PoolCallerRaw struct {
	Contract *PoolCaller // Generic read-only contract binding to access the raw methods on
}

PoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*PoolCallerRaw) Call

func (_Pool *PoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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.

type PoolCallerSession

type PoolCallerSession struct {
	Contract *PoolCaller   // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

PoolCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*PoolCallerSession) BalanceOf

func (_Pool *PoolCallerSession) BalanceOf(tokenId *big.Int, binId *big.Int) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x6da3bf8b.

Solidity: function balanceOf(uint256 tokenId, uint128 binId) view returns(uint256 lpToken)

func (*PoolCallerSession) BinBalanceA

func (_Pool *PoolCallerSession) BinBalanceA() (*big.Int, error)

BinBalanceA is a free data retrieval call binding the contract method 0x75bbbd73.

Solidity: function binBalanceA() view returns(uint128)

func (*PoolCallerSession) BinBalanceB

func (_Pool *PoolCallerSession) BinBalanceB() (*big.Int, error)

BinBalanceB is a free data retrieval call binding the contract method 0xfa158509.

Solidity: function binBalanceB() view returns(uint128)

func (*PoolCallerSession) BinMap

func (_Pool *PoolCallerSession) BinMap(tick int32) (*big.Int, error)

BinMap is a free data retrieval call binding the contract method 0xa2ba172f.

Solidity: function binMap(int32 tick) view returns(uint256)

func (*PoolCallerSession) BinPositions

func (_Pool *PoolCallerSession) BinPositions(tick int32, kind *big.Int) (*big.Int, error)

BinPositions is a free data retrieval call binding the contract method 0x83f9c632.

Solidity: function binPositions(int32 tick, uint256 kind) view returns(uint128)

func (*PoolCallerSession) Factory

func (_Pool *PoolCallerSession) Factory() (common.Address, error)

Factory is a free data retrieval call binding the contract method 0xc45a0155.

Solidity: function factory() view returns(address)

func (*PoolCallerSession) Fee

func (_Pool *PoolCallerSession) Fee() (*big.Int, error)

Fee is a free data retrieval call binding the contract method 0xddca3f43.

Solidity: function fee() view returns(uint256)

func (*PoolCallerSession) GetBin

func (_Pool *PoolCallerSession) GetBin(binId *big.Int) (IPoolBinState, error)

GetBin is a free data retrieval call binding the contract method 0x44a185bb.

Solidity: function getBin(uint128 binId) view returns((uint128,uint128,uint128,uint128,uint128,uint8,int32) bin)

func (*PoolCallerSession) GetCurrentTwa

func (_Pool *PoolCallerSession) GetCurrentTwa() (*big.Int, error)

GetCurrentTwa is a free data retrieval call binding the contract method 0xd3d3861a.

Solidity: function getCurrentTwa() view returns(int256)

func (*PoolCallerSession) GetState

func (_Pool *PoolCallerSession) GetState() (IPoolState, error)

GetState is a free data retrieval call binding the contract method 0x1865c57d.

Solidity: function getState() view returns((int32,uint8,uint128,uint64))

func (*PoolCallerSession) GetTwa

func (_Pool *PoolCallerSession) GetTwa() (IPoolTwaState, error)

GetTwa is a free data retrieval call binding the contract method 0xa4ed496a.

Solidity: function getTwa() view returns((int96,int96,uint64))

func (*PoolCallerSession) TickSpacing

func (_Pool *PoolCallerSession) TickSpacing() (*big.Int, error)

TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.

Solidity: function tickSpacing() view returns(uint256)

func (*PoolCallerSession) TokenA

func (_Pool *PoolCallerSession) TokenA() (common.Address, error)

TokenA is a free data retrieval call binding the contract method 0x0fc63d10.

Solidity: function tokenA() view returns(address)

func (*PoolCallerSession) TokenAScale

func (_Pool *PoolCallerSession) TokenAScale() (*big.Int, error)

TokenAScale is a free data retrieval call binding the contract method 0x3ab72c10.

Solidity: function tokenAScale() view returns(uint256)

func (*PoolCallerSession) TokenB

func (_Pool *PoolCallerSession) TokenB() (common.Address, error)

TokenB is a free data retrieval call binding the contract method 0x5f64b55b.

Solidity: function tokenB() view returns(address)

func (*PoolCallerSession) TokenBScale

func (_Pool *PoolCallerSession) TokenBScale() (*big.Int, error)

TokenBScale is a free data retrieval call binding the contract method 0x21272d4c.

Solidity: function tokenBScale() view returns(uint256)

type PoolFilterer

type PoolFilterer struct {
	// contains filtered or unexported fields
}

PoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewPoolFilterer

func NewPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*PoolFilterer, error)

NewPoolFilterer creates a new log filterer instance of Pool, bound to a specific deployed contract.

func (*PoolFilterer) FilterAddLiquidity

func (_Pool *PoolFilterer) FilterAddLiquidity(opts *bind.FilterOpts, sender []common.Address, tokenId []*big.Int) (*PoolAddLiquidityIterator, error)

FilterAddLiquidity is a free log retrieval operation binding the contract event 0x133a027327582be2089f6ca47137e3d337be4ca2cd921e5f0b178c9c2d5b8364.

Solidity: event AddLiquidity(address indexed sender, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolFilterer) FilterBinMerged

func (_Pool *PoolFilterer) FilterBinMerged(opts *bind.FilterOpts, binId []*big.Int) (*PoolBinMergedIterator, error)

FilterBinMerged is a free log retrieval operation binding the contract event 0x8ecf1f9da718dc4c174482cdb4e334113856b46a85e5694deeec06d512e8f772.

Solidity: event BinMerged(uint128 indexed binId, uint128 reserveA, uint128 reserveB, uint128 mergeId)

func (*PoolFilterer) FilterBinMoved

func (_Pool *PoolFilterer) FilterBinMoved(opts *bind.FilterOpts, binId []*big.Int) (*PoolBinMovedIterator, error)

FilterBinMoved is a free log retrieval operation binding the contract event 0x42e51620e75096344ac889cc1d899ab619aedbe89a4f6b230ee3cecb849c7e2f.

Solidity: event BinMoved(uint128 indexed binId, int128 previousTick, int128 newTick)

func (*PoolFilterer) FilterMigrateBinsUpStack

func (_Pool *PoolFilterer) FilterMigrateBinsUpStack(opts *bind.FilterOpts, sender []common.Address) (*PoolMigrateBinsUpStackIterator, error)

FilterMigrateBinsUpStack is a free log retrieval operation binding the contract event 0x6deceb91de75f84acd021df8c6410377aa442257495a79a9e3bfc7eba745853e.

Solidity: event MigrateBinsUpStack(address indexed sender, uint128 binId, uint32 maxRecursion)

func (*PoolFilterer) FilterProtocolFeeCollected

func (_Pool *PoolFilterer) FilterProtocolFeeCollected(opts *bind.FilterOpts) (*PoolProtocolFeeCollectedIterator, error)

FilterProtocolFeeCollected is a free log retrieval operation binding the contract event 0x292394e5b7a6b75d01122bb2dc85341cefec10b852325db9d3658a452f5eb211.

Solidity: event ProtocolFeeCollected(uint256 protocolFee, bool isTokenA)

func (*PoolFilterer) FilterRemoveLiquidity

func (_Pool *PoolFilterer) FilterRemoveLiquidity(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address, tokenId []*big.Int) (*PoolRemoveLiquidityIterator, error)

FilterRemoveLiquidity is a free log retrieval operation binding the contract event 0x65da280c1e973a1c5884c38d63e2c2b3c2a3158a0761e76545b64035e2489dfe.

Solidity: event RemoveLiquidity(address indexed sender, address indexed recipient, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolFilterer) FilterSetProtocolFeeRatio

func (_Pool *PoolFilterer) FilterSetProtocolFeeRatio(opts *bind.FilterOpts) (*PoolSetProtocolFeeRatioIterator, error)

FilterSetProtocolFeeRatio is a free log retrieval operation binding the contract event 0x06e6ba2b10970ecae3ab2c29feb60ab2503358820756ef14a9827b0fa5add30f.

Solidity: event SetProtocolFeeRatio(uint256 protocolFee)

func (*PoolFilterer) FilterSwap

func (_Pool *PoolFilterer) FilterSwap(opts *bind.FilterOpts) (*PoolSwapIterator, error)

FilterSwap is a free log retrieval operation binding the contract event 0x3b841dc9ab51e3104bda4f61b41e4271192d22cd19da5ee6e292dc8e2744f713.

Solidity: event Swap(address sender, address recipient, bool tokenAIn, bool exactOutput, uint256 amountIn, uint256 amountOut, int32 activeTick)

func (*PoolFilterer) FilterTransferLiquidity

func (_Pool *PoolFilterer) FilterTransferLiquidity(opts *bind.FilterOpts) (*PoolTransferLiquidityIterator, error)

FilterTransferLiquidity is a free log retrieval operation binding the contract event 0xd384edefdfebd0bb45d82f94aed5ff327fd6510cc6c53ddc78a3ef4a0e7c715c.

Solidity: event TransferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params)

func (*PoolFilterer) ParseAddLiquidity

func (_Pool *PoolFilterer) ParseAddLiquidity(log types.Log) (*PoolAddLiquidity, error)

ParseAddLiquidity is a log parse operation binding the contract event 0x133a027327582be2089f6ca47137e3d337be4ca2cd921e5f0b178c9c2d5b8364.

Solidity: event AddLiquidity(address indexed sender, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolFilterer) ParseBinMerged

func (_Pool *PoolFilterer) ParseBinMerged(log types.Log) (*PoolBinMerged, error)

ParseBinMerged is a log parse operation binding the contract event 0x8ecf1f9da718dc4c174482cdb4e334113856b46a85e5694deeec06d512e8f772.

Solidity: event BinMerged(uint128 indexed binId, uint128 reserveA, uint128 reserveB, uint128 mergeId)

func (*PoolFilterer) ParseBinMoved

func (_Pool *PoolFilterer) ParseBinMoved(log types.Log) (*PoolBinMoved, error)

ParseBinMoved is a log parse operation binding the contract event 0x42e51620e75096344ac889cc1d899ab619aedbe89a4f6b230ee3cecb849c7e2f.

Solidity: event BinMoved(uint128 indexed binId, int128 previousTick, int128 newTick)

func (*PoolFilterer) ParseMigrateBinsUpStack

func (_Pool *PoolFilterer) ParseMigrateBinsUpStack(log types.Log) (*PoolMigrateBinsUpStack, error)

ParseMigrateBinsUpStack is a log parse operation binding the contract event 0x6deceb91de75f84acd021df8c6410377aa442257495a79a9e3bfc7eba745853e.

Solidity: event MigrateBinsUpStack(address indexed sender, uint128 binId, uint32 maxRecursion)

func (*PoolFilterer) ParseProtocolFeeCollected

func (_Pool *PoolFilterer) ParseProtocolFeeCollected(log types.Log) (*PoolProtocolFeeCollected, error)

ParseProtocolFeeCollected is a log parse operation binding the contract event 0x292394e5b7a6b75d01122bb2dc85341cefec10b852325db9d3658a452f5eb211.

Solidity: event ProtocolFeeCollected(uint256 protocolFee, bool isTokenA)

func (*PoolFilterer) ParseRemoveLiquidity

func (_Pool *PoolFilterer) ParseRemoveLiquidity(log types.Log) (*PoolRemoveLiquidity, error)

ParseRemoveLiquidity is a log parse operation binding the contract event 0x65da280c1e973a1c5884c38d63e2c2b3c2a3158a0761e76545b64035e2489dfe.

Solidity: event RemoveLiquidity(address indexed sender, address indexed recipient, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolFilterer) ParseSetProtocolFeeRatio

func (_Pool *PoolFilterer) ParseSetProtocolFeeRatio(log types.Log) (*PoolSetProtocolFeeRatio, error)

ParseSetProtocolFeeRatio is a log parse operation binding the contract event 0x06e6ba2b10970ecae3ab2c29feb60ab2503358820756ef14a9827b0fa5add30f.

Solidity: event SetProtocolFeeRatio(uint256 protocolFee)

func (*PoolFilterer) ParseSwap

func (_Pool *PoolFilterer) ParseSwap(log types.Log) (*PoolSwap, error)

ParseSwap is a log parse operation binding the contract event 0x3b841dc9ab51e3104bda4f61b41e4271192d22cd19da5ee6e292dc8e2744f713.

Solidity: event Swap(address sender, address recipient, bool tokenAIn, bool exactOutput, uint256 amountIn, uint256 amountOut, int32 activeTick)

func (*PoolFilterer) ParseTransferLiquidity

func (_Pool *PoolFilterer) ParseTransferLiquidity(log types.Log) (*PoolTransferLiquidity, error)

ParseTransferLiquidity is a log parse operation binding the contract event 0xd384edefdfebd0bb45d82f94aed5ff327fd6510cc6c53ddc78a3ef4a0e7c715c.

Solidity: event TransferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params)

func (*PoolFilterer) WatchAddLiquidity

func (_Pool *PoolFilterer) WatchAddLiquidity(opts *bind.WatchOpts, sink chan<- *PoolAddLiquidity, sender []common.Address, tokenId []*big.Int) (event.Subscription, error)

WatchAddLiquidity is a free log subscription operation binding the contract event 0x133a027327582be2089f6ca47137e3d337be4ca2cd921e5f0b178c9c2d5b8364.

Solidity: event AddLiquidity(address indexed sender, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolFilterer) WatchBinMerged

func (_Pool *PoolFilterer) WatchBinMerged(opts *bind.WatchOpts, sink chan<- *PoolBinMerged, binId []*big.Int) (event.Subscription, error)

WatchBinMerged is a free log subscription operation binding the contract event 0x8ecf1f9da718dc4c174482cdb4e334113856b46a85e5694deeec06d512e8f772.

Solidity: event BinMerged(uint128 indexed binId, uint128 reserveA, uint128 reserveB, uint128 mergeId)

func (*PoolFilterer) WatchBinMoved

func (_Pool *PoolFilterer) WatchBinMoved(opts *bind.WatchOpts, sink chan<- *PoolBinMoved, binId []*big.Int) (event.Subscription, error)

WatchBinMoved is a free log subscription operation binding the contract event 0x42e51620e75096344ac889cc1d899ab619aedbe89a4f6b230ee3cecb849c7e2f.

Solidity: event BinMoved(uint128 indexed binId, int128 previousTick, int128 newTick)

func (*PoolFilterer) WatchMigrateBinsUpStack

func (_Pool *PoolFilterer) WatchMigrateBinsUpStack(opts *bind.WatchOpts, sink chan<- *PoolMigrateBinsUpStack, sender []common.Address) (event.Subscription, error)

WatchMigrateBinsUpStack is a free log subscription operation binding the contract event 0x6deceb91de75f84acd021df8c6410377aa442257495a79a9e3bfc7eba745853e.

Solidity: event MigrateBinsUpStack(address indexed sender, uint128 binId, uint32 maxRecursion)

func (*PoolFilterer) WatchProtocolFeeCollected

func (_Pool *PoolFilterer) WatchProtocolFeeCollected(opts *bind.WatchOpts, sink chan<- *PoolProtocolFeeCollected) (event.Subscription, error)

WatchProtocolFeeCollected is a free log subscription operation binding the contract event 0x292394e5b7a6b75d01122bb2dc85341cefec10b852325db9d3658a452f5eb211.

Solidity: event ProtocolFeeCollected(uint256 protocolFee, bool isTokenA)

func (*PoolFilterer) WatchRemoveLiquidity

func (_Pool *PoolFilterer) WatchRemoveLiquidity(opts *bind.WatchOpts, sink chan<- *PoolRemoveLiquidity, sender []common.Address, recipient []common.Address, tokenId []*big.Int) (event.Subscription, error)

WatchRemoveLiquidity is a free log subscription operation binding the contract event 0x65da280c1e973a1c5884c38d63e2c2b3c2a3158a0761e76545b64035e2489dfe.

Solidity: event RemoveLiquidity(address indexed sender, address indexed recipient, uint256 indexed tokenId, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolFilterer) WatchSetProtocolFeeRatio

func (_Pool *PoolFilterer) WatchSetProtocolFeeRatio(opts *bind.WatchOpts, sink chan<- *PoolSetProtocolFeeRatio) (event.Subscription, error)

WatchSetProtocolFeeRatio is a free log subscription operation binding the contract event 0x06e6ba2b10970ecae3ab2c29feb60ab2503358820756ef14a9827b0fa5add30f.

Solidity: event SetProtocolFeeRatio(uint256 protocolFee)

func (*PoolFilterer) WatchSwap

func (_Pool *PoolFilterer) WatchSwap(opts *bind.WatchOpts, sink chan<- *PoolSwap) (event.Subscription, error)

WatchSwap is a free log subscription operation binding the contract event 0x3b841dc9ab51e3104bda4f61b41e4271192d22cd19da5ee6e292dc8e2744f713.

Solidity: event Swap(address sender, address recipient, bool tokenAIn, bool exactOutput, uint256 amountIn, uint256 amountOut, int32 activeTick)

func (*PoolFilterer) WatchTransferLiquidity

func (_Pool *PoolFilterer) WatchTransferLiquidity(opts *bind.WatchOpts, sink chan<- *PoolTransferLiquidity) (event.Subscription, error)

WatchTransferLiquidity is a free log subscription operation binding the contract event 0xd384edefdfebd0bb45d82f94aed5ff327fd6510cc6c53ddc78a3ef4a0e7c715c.

Solidity: event TransferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params)

type PoolMigrateBinsUpStack

type PoolMigrateBinsUpStack struct {
	Sender       common.Address
	BinId        *big.Int
	MaxRecursion uint32
	Raw          types.Log // Blockchain specific contextual infos
}

PoolMigrateBinsUpStack represents a MigrateBinsUpStack event raised by the Pool contract.

type PoolMigrateBinsUpStackIterator

type PoolMigrateBinsUpStackIterator struct {
	Event *PoolMigrateBinsUpStack // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolMigrateBinsUpStackIterator is returned from FilterMigrateBinsUpStack and is used to iterate over the raw logs and unpacked data for MigrateBinsUpStack events raised by the Pool contract.

func (*PoolMigrateBinsUpStackIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolMigrateBinsUpStackIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolMigrateBinsUpStackIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolProtocolFeeCollected

type PoolProtocolFeeCollected struct {
	ProtocolFee *big.Int
	IsTokenA    bool
	Raw         types.Log // Blockchain specific contextual infos
}

PoolProtocolFeeCollected represents a ProtocolFeeCollected event raised by the Pool contract.

type PoolProtocolFeeCollectedIterator

type PoolProtocolFeeCollectedIterator struct {
	Event *PoolProtocolFeeCollected // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolProtocolFeeCollectedIterator is returned from FilterProtocolFeeCollected and is used to iterate over the raw logs and unpacked data for ProtocolFeeCollected events raised by the Pool contract.

func (*PoolProtocolFeeCollectedIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolProtocolFeeCollectedIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolProtocolFeeCollectedIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolRaw

type PoolRaw struct {
	Contract *Pool // Generic contract binding to access the raw methods on
}

PoolRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*PoolRaw) Call

func (_Pool *PoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

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 (*PoolRaw) Transact

func (_Pool *PoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*PoolRaw) Transfer

func (_Pool *PoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type PoolRemoveLiquidity

type PoolRemoveLiquidity struct {
	Sender    common.Address
	Recipient common.Address
	TokenId   *big.Int
	BinDeltas []IPoolBinDelta
	Raw       types.Log // Blockchain specific contextual infos
}

PoolRemoveLiquidity represents a RemoveLiquidity event raised by the Pool contract.

type PoolRemoveLiquidityIterator

type PoolRemoveLiquidityIterator struct {
	Event *PoolRemoveLiquidity // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolRemoveLiquidityIterator is returned from FilterRemoveLiquidity and is used to iterate over the raw logs and unpacked data for RemoveLiquidity events raised by the Pool contract.

func (*PoolRemoveLiquidityIterator) Close

func (it *PoolRemoveLiquidityIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolRemoveLiquidityIterator) Error

func (it *PoolRemoveLiquidityIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolRemoveLiquidityIterator) Next

func (it *PoolRemoveLiquidityIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolSession

type PoolSession struct {
	Contract     *Pool             // 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
}

PoolSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*PoolSession) AddLiquidity

func (_Pool *PoolSession) AddLiquidity(tokenId *big.Int, params []IPoolAddLiquidityParams, data []byte) (*types.Transaction, error)

AddLiquidity is a paid mutator transaction binding the contract method 0x9d5f20bb.

Solidity: function addLiquidity(uint256 tokenId, (uint8,int32,bool,uint128,uint128)[] params, bytes data) returns(uint256 tokenAAmount, uint256 tokenBAmount, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolSession) BalanceOf

func (_Pool *PoolSession) BalanceOf(tokenId *big.Int, binId *big.Int) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x6da3bf8b.

Solidity: function balanceOf(uint256 tokenId, uint128 binId) view returns(uint256 lpToken)

func (*PoolSession) BinBalanceA

func (_Pool *PoolSession) BinBalanceA() (*big.Int, error)

BinBalanceA is a free data retrieval call binding the contract method 0x75bbbd73.

Solidity: function binBalanceA() view returns(uint128)

func (*PoolSession) BinBalanceB

func (_Pool *PoolSession) BinBalanceB() (*big.Int, error)

BinBalanceB is a free data retrieval call binding the contract method 0xfa158509.

Solidity: function binBalanceB() view returns(uint128)

func (*PoolSession) BinMap

func (_Pool *PoolSession) BinMap(tick int32) (*big.Int, error)

BinMap is a free data retrieval call binding the contract method 0xa2ba172f.

Solidity: function binMap(int32 tick) view returns(uint256)

func (*PoolSession) BinPositions

func (_Pool *PoolSession) BinPositions(tick int32, kind *big.Int) (*big.Int, error)

BinPositions is a free data retrieval call binding the contract method 0x83f9c632.

Solidity: function binPositions(int32 tick, uint256 kind) view returns(uint128)

func (*PoolSession) Factory

func (_Pool *PoolSession) Factory() (common.Address, error)

Factory is a free data retrieval call binding the contract method 0xc45a0155.

Solidity: function factory() view returns(address)

func (*PoolSession) Fee

func (_Pool *PoolSession) Fee() (*big.Int, error)

Fee is a free data retrieval call binding the contract method 0xddca3f43.

Solidity: function fee() view returns(uint256)

func (*PoolSession) GetBin

func (_Pool *PoolSession) GetBin(binId *big.Int) (IPoolBinState, error)

GetBin is a free data retrieval call binding the contract method 0x44a185bb.

Solidity: function getBin(uint128 binId) view returns((uint128,uint128,uint128,uint128,uint128,uint8,int32) bin)

func (*PoolSession) GetCurrentTwa

func (_Pool *PoolSession) GetCurrentTwa() (*big.Int, error)

GetCurrentTwa is a free data retrieval call binding the contract method 0xd3d3861a.

Solidity: function getCurrentTwa() view returns(int256)

func (*PoolSession) GetState

func (_Pool *PoolSession) GetState() (IPoolState, error)

GetState is a free data retrieval call binding the contract method 0x1865c57d.

Solidity: function getState() view returns((int32,uint8,uint128,uint64))

func (*PoolSession) GetTwa

func (_Pool *PoolSession) GetTwa() (IPoolTwaState, error)

GetTwa is a free data retrieval call binding the contract method 0xa4ed496a.

Solidity: function getTwa() view returns((int96,int96,uint64))

func (*PoolSession) MigrateBinUpStack

func (_Pool *PoolSession) MigrateBinUpStack(binId *big.Int, maxRecursion uint32) (*types.Transaction, error)

MigrateBinUpStack is a paid mutator transaction binding the contract method 0xc0c5d7fb.

Solidity: function migrateBinUpStack(uint128 binId, uint32 maxRecursion) returns()

func (*PoolSession) RemoveLiquidity

func (_Pool *PoolSession) RemoveLiquidity(recipient common.Address, tokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error)

RemoveLiquidity is a paid mutator transaction binding the contract method 0x57c8c7b0.

Solidity: function removeLiquidity(address recipient, uint256 tokenId, (uint128,uint128)[] params) returns(uint256 tokenAOut, uint256 tokenBOut, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolSession) Swap

func (_Pool *PoolSession) Swap(recipient common.Address, amount *big.Int, tokenAIn bool, exactOutput bool, sqrtPriceLimit *big.Int, data []byte) (*types.Transaction, error)

Swap is a paid mutator transaction binding the contract method 0xc51c9029.

Solidity: function swap(address recipient, uint256 amount, bool tokenAIn, bool exactOutput, uint256 sqrtPriceLimit, bytes data) returns(uint256 amountIn, uint256 amountOut)

func (*PoolSession) TickSpacing

func (_Pool *PoolSession) TickSpacing() (*big.Int, error)

TickSpacing is a free data retrieval call binding the contract method 0xd0c93a7c.

Solidity: function tickSpacing() view returns(uint256)

func (*PoolSession) TokenA

func (_Pool *PoolSession) TokenA() (common.Address, error)

TokenA is a free data retrieval call binding the contract method 0x0fc63d10.

Solidity: function tokenA() view returns(address)

func (*PoolSession) TokenAScale

func (_Pool *PoolSession) TokenAScale() (*big.Int, error)

TokenAScale is a free data retrieval call binding the contract method 0x3ab72c10.

Solidity: function tokenAScale() view returns(uint256)

func (*PoolSession) TokenB

func (_Pool *PoolSession) TokenB() (common.Address, error)

TokenB is a free data retrieval call binding the contract method 0x5f64b55b.

Solidity: function tokenB() view returns(address)

func (*PoolSession) TokenBScale

func (_Pool *PoolSession) TokenBScale() (*big.Int, error)

TokenBScale is a free data retrieval call binding the contract method 0x21272d4c.

Solidity: function tokenBScale() view returns(uint256)

func (*PoolSession) TransferLiquidity

func (_Pool *PoolSession) TransferLiquidity(fromTokenId *big.Int, toTokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error)

TransferLiquidity is a paid mutator transaction binding the contract method 0xd279735f.

Solidity: function transferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params) returns()

type PoolSetProtocolFeeRatio

type PoolSetProtocolFeeRatio struct {
	ProtocolFee *big.Int
	Raw         types.Log // Blockchain specific contextual infos
}

PoolSetProtocolFeeRatio represents a SetProtocolFeeRatio event raised by the Pool contract.

type PoolSetProtocolFeeRatioIterator

type PoolSetProtocolFeeRatioIterator struct {
	Event *PoolSetProtocolFeeRatio // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolSetProtocolFeeRatioIterator is returned from FilterSetProtocolFeeRatio and is used to iterate over the raw logs and unpacked data for SetProtocolFeeRatio events raised by the Pool contract.

func (*PoolSetProtocolFeeRatioIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolSetProtocolFeeRatioIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolSetProtocolFeeRatioIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolSwap

type PoolSwap struct {
	Sender      common.Address
	Recipient   common.Address
	TokenAIn    bool
	ExactOutput bool
	AmountIn    *big.Int
	AmountOut   *big.Int
	ActiveTick  int32
	Raw         types.Log // Blockchain specific contextual infos
}

PoolSwap represents a Swap event raised by the Pool contract.

type PoolSwapIterator

type PoolSwapIterator struct {
	Event *PoolSwap // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the Pool contract.

func (*PoolSwapIterator) Close

func (it *PoolSwapIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolSwapIterator) Error

func (it *PoolSwapIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolSwapIterator) Next

func (it *PoolSwapIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type PoolTransactor

type PoolTransactor struct {
	// contains filtered or unexported fields
}

PoolTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewPoolTransactor

func NewPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*PoolTransactor, error)

NewPoolTransactor creates a new write-only instance of Pool, bound to a specific deployed contract.

func (*PoolTransactor) AddLiquidity

func (_Pool *PoolTransactor) AddLiquidity(opts *bind.TransactOpts, tokenId *big.Int, params []IPoolAddLiquidityParams, data []byte) (*types.Transaction, error)

AddLiquidity is a paid mutator transaction binding the contract method 0x9d5f20bb.

Solidity: function addLiquidity(uint256 tokenId, (uint8,int32,bool,uint128,uint128)[] params, bytes data) returns(uint256 tokenAAmount, uint256 tokenBAmount, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolTransactor) MigrateBinUpStack

func (_Pool *PoolTransactor) MigrateBinUpStack(opts *bind.TransactOpts, binId *big.Int, maxRecursion uint32) (*types.Transaction, error)

MigrateBinUpStack is a paid mutator transaction binding the contract method 0xc0c5d7fb.

Solidity: function migrateBinUpStack(uint128 binId, uint32 maxRecursion) returns()

func (*PoolTransactor) RemoveLiquidity

func (_Pool *PoolTransactor) RemoveLiquidity(opts *bind.TransactOpts, recipient common.Address, tokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error)

RemoveLiquidity is a paid mutator transaction binding the contract method 0x57c8c7b0.

Solidity: function removeLiquidity(address recipient, uint256 tokenId, (uint128,uint128)[] params) returns(uint256 tokenAOut, uint256 tokenBOut, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolTransactor) Swap

func (_Pool *PoolTransactor) Swap(opts *bind.TransactOpts, recipient common.Address, amount *big.Int, tokenAIn bool, exactOutput bool, sqrtPriceLimit *big.Int, data []byte) (*types.Transaction, error)

Swap is a paid mutator transaction binding the contract method 0xc51c9029.

Solidity: function swap(address recipient, uint256 amount, bool tokenAIn, bool exactOutput, uint256 sqrtPriceLimit, bytes data) returns(uint256 amountIn, uint256 amountOut)

func (*PoolTransactor) TransferLiquidity

func (_Pool *PoolTransactor) TransferLiquidity(opts *bind.TransactOpts, fromTokenId *big.Int, toTokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error)

TransferLiquidity is a paid mutator transaction binding the contract method 0xd279735f.

Solidity: function transferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params) returns()

type PoolTransactorRaw

type PoolTransactorRaw struct {
	Contract *PoolTransactor // Generic write-only contract binding to access the raw methods on
}

PoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*PoolTransactorRaw) Transact

func (_Pool *PoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*PoolTransactorRaw) Transfer

func (_Pool *PoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type PoolTransactorSession

type PoolTransactorSession struct {
	Contract     *PoolTransactor   // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

PoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*PoolTransactorSession) AddLiquidity

func (_Pool *PoolTransactorSession) AddLiquidity(tokenId *big.Int, params []IPoolAddLiquidityParams, data []byte) (*types.Transaction, error)

AddLiquidity is a paid mutator transaction binding the contract method 0x9d5f20bb.

Solidity: function addLiquidity(uint256 tokenId, (uint8,int32,bool,uint128,uint128)[] params, bytes data) returns(uint256 tokenAAmount, uint256 tokenBAmount, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolTransactorSession) MigrateBinUpStack

func (_Pool *PoolTransactorSession) MigrateBinUpStack(binId *big.Int, maxRecursion uint32) (*types.Transaction, error)

MigrateBinUpStack is a paid mutator transaction binding the contract method 0xc0c5d7fb.

Solidity: function migrateBinUpStack(uint128 binId, uint32 maxRecursion) returns()

func (*PoolTransactorSession) RemoveLiquidity

func (_Pool *PoolTransactorSession) RemoveLiquidity(recipient common.Address, tokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error)

RemoveLiquidity is a paid mutator transaction binding the contract method 0x57c8c7b0.

Solidity: function removeLiquidity(address recipient, uint256 tokenId, (uint128,uint128)[] params) returns(uint256 tokenAOut, uint256 tokenBOut, (uint128,uint128,uint256,uint128,uint8,int32,bool)[] binDeltas)

func (*PoolTransactorSession) Swap

func (_Pool *PoolTransactorSession) Swap(recipient common.Address, amount *big.Int, tokenAIn bool, exactOutput bool, sqrtPriceLimit *big.Int, data []byte) (*types.Transaction, error)

Swap is a paid mutator transaction binding the contract method 0xc51c9029.

Solidity: function swap(address recipient, uint256 amount, bool tokenAIn, bool exactOutput, uint256 sqrtPriceLimit, bytes data) returns(uint256 amountIn, uint256 amountOut)

func (*PoolTransactorSession) TransferLiquidity

func (_Pool *PoolTransactorSession) TransferLiquidity(fromTokenId *big.Int, toTokenId *big.Int, params []IPoolRemoveLiquidityParams) (*types.Transaction, error)

TransferLiquidity is a paid mutator transaction binding the contract method 0xd279735f.

Solidity: function transferLiquidity(uint256 fromTokenId, uint256 toTokenId, (uint128,uint128)[] params) returns()

type PoolTransferLiquidity

type PoolTransferLiquidity struct {
	FromTokenId *big.Int
	ToTokenId   *big.Int
	Params      []IPoolRemoveLiquidityParams
	Raw         types.Log // Blockchain specific contextual infos
}

PoolTransferLiquidity represents a TransferLiquidity event raised by the Pool contract.

type PoolTransferLiquidityIterator

type PoolTransferLiquidityIterator struct {
	Event *PoolTransferLiquidity // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

PoolTransferLiquidityIterator is returned from FilterTransferLiquidity and is used to iterate over the raw logs and unpacked data for TransferLiquidity events raised by the Pool contract.

func (*PoolTransferLiquidityIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*PoolTransferLiquidityIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*PoolTransferLiquidityIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL