Documentation
¶
Overview ¶
Package pumpswap preloads PumpSwap AMM pool state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ProgramID = sgo.MustPublicKeyFromBase58("pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA")
)
var Schema string
Functions ¶
Types ¶
type Pool ¶
type Pool struct {
Pool sgo.PublicKey `json:"pool"`
BaseMint sgo.PublicKey `json:"base_mint"`
QuoteMint sgo.PublicKey `json:"quote_mint"`
BaseVault sgo.PublicKey `json:"base_vault"`
QuoteVault sgo.PublicKey `json:"quote_vault"`
CoinCreator sgo.PublicKey `json:"coin_creator"`
BaseBalance uint64 `json:"base_balance"`
QuoteBalance uint64 `json:"quote_balance"`
}
Pool holds one PumpSwap pool's parsed state.
type PoolJSON ¶
type PoolJSON struct {
Pool sgo.PublicKey `json:"pool"`
BaseMint sgo.PublicKey `json:"base_mint"`
QuoteMint sgo.PublicKey `json:"quote_mint"`
BaseVault sgo.PublicKey `json:"base_vault"`
QuoteVault sgo.PublicKey `json:"quote_vault"`
BaseBalance int64 `json:"base_balance"`
QuoteBalance int64 `json:"quote_balance"`
}
PoolJSON is one pumpswap_pool row, JSON-shaped for catscope-rust-bot's build.rs to read instead of opening prefetch.db directly. Exported unfiltered -- every column here is NOT NULL (base_balance/quote_balance default to 0), and the table is small (~4K rows), so there's nothing to filter or cap on the Go side; build.rs applies its own base_balance/quote_balance > 0 filter for the router graph.
type Pumpswap ¶
type Pumpswap struct {
Pools []*Pool
}
Pumpswap holds pools loaded at startup.
func Create ¶
func Create(ctx context.Context, stateClient state.Client, db *sql.DB, maxSubscriptionCount int, force bool) (*Pumpswap, error)
Create discovers PumpSwap pools and persists results to db (pumpswap_pool). If db already has pools from a previous run, they're loaded back instead of re-fetching, unless force is true.
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func CreateQuery ¶
CreateQuery prepares the top-pools-by-liquidity statement against pumpswap_pool. Callers wrap the result as one dispatch case of a single, consolidated "get top pools" tool (see prefetch/prompttool.go) rather than exposing their own separate tool.
Source Files
¶
- event.go
- export.go
- pool.go
- pumpswap.go
- query.go
- schema.go
- store.go