Documentation
¶
Overview ¶
Package raydium preloads Raydium AMM v4 trading pools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ProgramID = sgo.MustPublicKeyFromBase58("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8")
Functions ¶
func Create ¶
func Create( parentCtx context.Context, stateClient state.Client, db *sql.DB, maxSubscriptionCount int, force bool, mintTracker *mintinfo.Tracker, mDownload map[string]struct{}, ) error
Create downloads Raydium pool data from the on-chain state service and writes it to db (if non-nil). Each sub-package writes accounts to the database inline via CommitStart/CommitFinish as they stream in. If force is true, each sub-package re-fetches even if its tables are already populated, instead of skipping.
Types ¶
type Loader ¶ added in v0.4.16
type Loader struct {
// contains filtered or unexported fields
}
Loader is a prefetch.StaticLoader that snapshots the live raydium.db (already populated in place by Create, via amm/clmm/cpmm's CommitStart/ CommitFinish transactions) out to the wasm build's target directory.
func NewLoader ¶ added in v0.4.16
NewLoader wraps the already-open raydium database for use as a StaticLoader.
type PoolSummary ¶ added in v0.4.16
PoolSummary is a unified, cross-program view of a single pool used for ranking. Liquidity is the sum of both vault balances in raw token units (no decimals or price normalization applied), so it is only a rough proxy for comparing pools that trade different token pairs.
type Raydium ¶
type Raydium struct {
Amm *amm.Configuration `json:"amm"`
Clmm *clmm.Configuration `json:"clmm"`
Cpmm *cpmm.Configuration `json:"cpmm"`
}
Raydium holds all AMM v4 pools loaded at startup.
type Stats ¶ added in v0.4.16
type Stats struct {
AmmCount int
CpmmCount int
ClmmCount int
// Top10 holds up to 10 pools with the highest Liquidity across all
// three programs, sorted descending.
Top10 []PoolSummary
}
Stats is a count-based summary of the pools currently stored in a database.
Source Files
¶
- loader.go
- print.go
- raydium.go