pool

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractType

type ContractType string
const (
	ContractTypePool  ContractType = "pool"
	ContractTypeToken ContractType = "token"
	ContractTypeGauge ContractType = "gauge"
)

Contract types.

type GetPoolData

type GetPoolData struct {
	PoolData []Pool `json:"poolData"`
}

type Pool

type Pool struct {
	Network                       filter.Network `json:"-"`
	Name                          string         `json:"name"`
	Address                       common.Address `json:"address"`
	LiquidityProviderTokenAddress common.Address `json:"lpTokenAddress"`
	GaugeAddress                  common.Address `json:"gaugeAddress"`
}

Pool is a curve pool.

type Registry

type Registry interface {
	Refresh(ctx context.Context) error
	Validate(ctx context.Context, chain filter.Network, contractType ContractType, address common.Address) (*Pool, error)
}

Registry is a registry for the curve pools.

func NewRegistry

func NewRegistry(redisClient rueidis.Client, httpClient httpx.Client) Registry

NewRegistry creates a new registry.

type Response

type Response[T any] struct {
	Success   bool  `json:"success"`
	Data      T     `json:"data"`
	Timestamp int64 `json:"generatedTimeMs"`
}

Response is a curve pool.

Jump to

Keyboard shortcuts

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