Documentation
¶
Overview ¶
Package pumpfun preloads Pump.fun bonding-curve state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ProgramID = sgo.MustPublicKeyFromBase58("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P")
)
var Schema string
Functions ¶
func ExportJSON ¶
ExportJSON writes every pumpfun_bonding_curve row to path. If the table doesn't exist yet (an older prefetch.db that predates pumpfun support), writes an empty JSON array instead of failing -- matches build.rs's own existing "table not found -> degrade gracefully" convention for this table.
Types ¶
type BondingCurveEntry ¶
type BondingCurveEntry struct {
Mint sgo.PublicKey `json:"mint"`
BondingCurve sgo.PublicKey `json:"bonding_curve"`
Creator sgo.PublicKey `json:"creator"`
QuoteMint sgo.PublicKey `json:"quote_mint"`
VirtualTokenReserves uint64 `json:"virtual_token_reserves"`
VirtualSolReserves uint64 `json:"virtual_sol_reserves"`
RealTokenReserves uint64 `json:"real_token_reserves"`
RealSolReserves uint64 `json:"real_sol_reserves"`
Complete bool `json:"complete"`
}
BondingCurveEntry holds one bonding curve's parsed state.
type BondingCurveJSON ¶
type BondingCurveJSON struct {
Mint sgo.PublicKey `json:"mint"`
QuoteMint sgo.PublicKey `json:"quote_mint"`
RealSolReserves int64 `json:"real_sol_reserves"`
Complete bool `json:"complete"`
}
BondingCurveJSON is one pumpfun_bonding_curve row, JSON-shaped for catscope-rust-bot's build.rs to read instead of opening prefetch.db directly. Exported unfiltered (every column is NOT NULL, table is tiny -- ~400 rows on a real prefetch.db); build.rs applies its own complete/quote_mint/real_sol_reserves filter for the router graph.
type Pumpfun ¶
type Pumpfun struct {
Curves []*BondingCurveEntry
}
Pumpfun holds bonding curves loaded at startup.
func Create ¶
func Create(ctx context.Context, stateClient state.Client, db *sql.DB, maxSubscriptionCount int, force bool) (*Pumpfun, error)
Create discovers Pump.fun bonding curves and persists results to db (pumpfun_bonding_curve). If db already has curves from a previous run, they're loaded back instead of re-fetching, unless force is true.
maxSubscriptionCount bounds how many roots may be in flight at once (see util.PendingSubscriptionStatus) -- same purpose as orca.Create's parameter of the same name. Pump.fun's mint volume is Orca-scale or larger (every token ever created via pump.fun's bonding curve, most long-dead), so this throttle matters here too.
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func CreateQuery ¶
CreateQuery prepares the top-bonding-curves-by-reserves statement against pumpfun_bonding_curve. 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
¶
- curve.go
- event.go
- export.go
- pumpfun.go
- query.go
- schema.go
- store.go