parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PumpFunEventAuthority = "Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1"
)

Functions

func IsSystemProgrmId

func IsSystemProgrmId(program solana.PublicKey) bool

func IsTokenProgramId

func IsTokenProgramId(program solana.PublicKey) bool

Types

type InstructionContext

type InstructionContext struct {
	// contains filtered or unexported fields
}

type SolParser

type SolParser struct {
	// contains filtered or unexported fields
}

func NewSolParser

func NewSolParser(cli *rpc.Client) *SolParser

func (*SolParser) FillTokenAmtWithTransferIx

func (s *SolParser) FillTokenAmtWithTransferIx(tkAmt types.TokenAmt, ix *rpc.ParsedInstruction) (types.TokenAmt, error)

func (*SolParser) GetParseFuncByProgramId

func (s *SolParser) GetParseFuncByProgramId(programId string) (func(*rpc.ParsedInstruction) (*types.SwapTransactionEvent, error), bool)

func (*SolParser) GetTokenAccountInfoByTokenAccount

func (s *SolParser) GetTokenAccountInfoByTokenAccount(tokenAccount string) (*token.TokenAccount, error)

func (*SolParser) ParseClmmSwapEvent

func (s *SolParser) ParseClmmSwapEvent(clmmSwapIx *rpc.ParsedInstruction) (*types2.SwapTransactionEvent, error)

func (*SolParser) ParseInstructionIntoSwapEvent

func (s *SolParser) ParseInstructionIntoSwapEvent(parsedTransaction *rpc.GetParsedTransactionResult, idxOuter int, swapIx *rpc.ParsedInstruction, transferIx1 *rpc.ParsedInstruction, transferIx2 *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseLifinitySwapEvent

func (s *SolParser) ParseLifinitySwapEvent(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseOrcaSwapEvent

func (s *SolParser) ParseOrcaSwapEvent(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseOrcaSwapV1Event

func (s *SolParser) ParseOrcaSwapV1Event(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseOrcaSwapV2Event

func (s *SolParser) ParseOrcaSwapV2Event(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseOrcaWhirlPoolSwapEvent

func (s *SolParser) ParseOrcaWhirlPoolSwapEvent(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParsePhoenixSwapEvent

func (s *SolParser) ParsePhoenixSwapEvent(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParsePumpFunCpiLog

func (s *SolParser) ParsePumpFunCpiLog(ix *rpc.ParsedInstruction, swapEvent *types.SwapTransactionEvent) (*types.SwapTransactionEvent, error)

func (*SolParser) ParsePumpFunSwapEvent

func (s *SolParser) ParsePumpFunSwapEvent(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseRaydiumAmmSwapEvent

func (s *SolParser) ParseRaydiumAmmSwapEvent(ammSwapIx *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) ParseRaydiumCpmmSwap

func (s *SolParser) ParseRaydiumCpmmSwap(tx *rpc.ParsedInstruction) (*types2.SwapTransactionEvent, error)

func (*SolParser) ParseSwapEvent

func (s *SolParser) ParseSwapEvent(parsedTransaction *rpc.GetParsedTransactionResult) ([]*types.SwapTransactionEvent, error)

func (*SolParser) ParseSystemTransfer

func (s *SolParser) ParseSystemTransfer(ix *rpc.ParsedInstruction) (*coder.SystemTransfer, error)

func (*SolParser) ParseTokenTransfer

func (s *SolParser) ParseTokenTransfer(ix *rpc.ParsedInstruction) (*coder.TokenTransfer, error)

func (*SolParser) ParseTransfer

func (s *SolParser) ParseTransfer(ix *rpc.ParsedInstruction) (*coder.TokenTransfer, error)

func (*SolParser) ProcessMeteoraSwapEvent

func (s *SolParser) ProcessMeteoraSwapEvent(ix *rpc.ParsedInstruction) (*types.SwapTransactionEvent, error)

func (*SolParser) RetryGetTokenAccountInfoByTokenAccount

func (s *SolParser) RetryGetTokenAccountInfoByTokenAccount(tokenAccount string) (*token.TokenAccount, error)

type SwapInstructions

type SwapInstructions struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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