lp_v4

package
v0.0.0-...-d39dd24 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Q128 = new(big.Int).Lsh(big.NewInt(1), 128)
View Source
var Q256 = new(big.Int).Lsh(big.NewInt(1), 256)
View Source
var TWO96 = new(big.Int).Exp(big.NewInt(2), big.NewInt(96), nil)
View Source
var V4_POOL_MANAGER abi.ABI
View Source
var V4_POOL_MANAGER_JSON []byte
View Source
var V4_POSITION_MANAGER abi.ABI
View Source
var V4_POSITION_MANAGER_JSON []byte
View Source
var V4_STATE_VIEW abi.ABI
View Source
var V4_STATE_VIEW_JSON []byte

Functions

func Init

func Init()

func Loop

func Loop()

Types

type SubgraphData

type SubgraphData struct {
	Positions []SubgraphPosition `json:"positions"`
}

type SubgraphError

type SubgraphError struct {
	Message string `json:"message"`
}

type SubgraphPool

type SubgraphPool struct {
	ID      string        `json:"id"`
	Token0  SubgraphToken `json:"token0"`
	Token1  SubgraphToken `json:"token1"`
	FeeTier string        `json:"feeTier"`
	Hooks   string        `json:"hooks"`
}

Pool type for V4 subgraph

type SubgraphPoolData

type SubgraphPoolData struct {
	Pool *SubgraphPool `json:"pool"`
}

type SubgraphPoolResponse

type SubgraphPoolResponse struct {
	Data   SubgraphPoolData `json:"data"`
	Errors []SubgraphError  `json:"errors,omitempty"`
}

Response for pool query

type SubgraphPosition

type SubgraphPosition struct {
	ID                 string `json:"id"`
	TokenId            string `json:"tokenId"`
	Owner              string `json:"owner"`
	Origin             string `json:"origin"`
	CreatedAtTimestamp string `json:"createdAtTimestamp"`
}

Position in V4 subgraph - basic NFT position info

type SubgraphResponse

type SubgraphResponse struct {
	Data   SubgraphData    `json:"data"`
	Errors []SubgraphError `json:"errors,omitempty"`
}

GraphQL response structures for Uniswap V4 subgraph

type SubgraphToken

type SubgraphToken struct {
	ID     string `json:"id"`
	Symbol string `json:"symbol"`
}

Jump to

Keyboard shortcuts

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