pumpfun

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveBondingCurveAddress added in v0.7.1

func DeriveBondingCurveAddress(tokenAddress solana.PublicKey) (solana.PublicKey, error)

func GetSwapInstructions

func GetSwapInstructions(
	userAddress solana.PublicKey,
	swapType type_.SwapType,
	tokenAddress solana.PublicKey,
	tokenAmountWithDecimals uint64,
	isCloseUserAssociatedTokenAddress bool,
	virtualSolReserveWithDecimals uint64,
	virtualTokenReserveWithDecimals uint64,
	slippage int64,
) ([]solana.Instruction, error)

func IsAddLiqByLogs added in v0.6.0

func IsAddLiqByLogs(logs []string) bool

func IsRemoveLiqByLogs added in v0.4.8

func IsRemoveLiqByLogs(logs []string) bool

func ParseAddLiqTx added in v0.0.8

func ParseAddLiqTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*pumpfun_type.AddLiqTxDataType, error)

func ParseCreateByLogs added in v0.4.8

func ParseCreateByLogs(logs []string) *pumpfun_type.CreateDataType

func ParseCreateTx

func ParseCreateTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*pumpfun_type.CreateTxDataType, error)

func ParseRemoveLiqTx

func ParseRemoveLiqTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*pumpfun_type.RemoveLiqTxDataType, error)

上岸

func ParseSwapByLogs added in v0.4.5

func ParseSwapByLogs(logs []string) []*pumpfun_type.SwapDataType

func ParseSwapTx

func ParseSwapTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*pumpfun_type.SwapTxDataType, error)

func ParseTx

func ParseTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*pumpfun_type.ParseTxResult, error)

Types

type BondingCurveDataType

type BondingCurveDataType struct {
	BondingCurveAddress             string
	VirtualTokenReserveWithDecimals uint64
	VirtualSolReserveWithDecimals   uint64
	RealTokenReserveWithDecimals    uint64
	RealSolReserveWithDecimals      uint64
	TokenTotalSupplyWithDecimals    uint64
	Complete                        bool
}

func GetBondingCurveData

func GetBondingCurveData(
	rpcClient *rpc.Client,
	tokenAddress *solana.PublicKey,
	bondingCurveAddress *solana.PublicKey,
) (*BondingCurveDataType, error)

type TokenMetadata

type TokenMetadata struct {
	Name        string `json:"name"`
	Symbol      string `json:"symbol"`
	Description string `json:"description"`
	Image       string `json:"image"`
	ShowName    bool   `json:"showName"`
	CreatedOn   string `json:"createdOn"`
	Twitter     string `json:"twitter"`
	Telegram    string `json:"telegram"`
	Website     string `json:"website"`
}

func URIInfo

func URIInfo(logger i_logger.ILogger, uri string) (*TokenMetadata, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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