lifinity

package
v0.0.0-...-07d62d3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const LifinitySwapInstructionSize = 24

LifinitySwapInstructionSize is the size of a Lifinity swap instruction enum

Variables

View Source
var LifinitySwapInstructionVariant = []byte{248, 198, 158, 145, 225, 117, 135, 200}

LifinitySwapInstructionVariant is the enum variant of the Lifinity swap instruction this is the first 8 bytes of sha256('global:swap')

Functions

func GetLifinityFees

func GetLifinityFees(solanaClient *rpc.Provider, transaction types.TransactionResult, lifinityProgramID string, fluidTokens map[string]string) (feesPaid *big.Rat, err error)

func GetLogFees

func GetLogFees(logs []string, lifinityProgramID string, transactionSignature string) (logFees []uint64, err error)

Types

type FeeData

type FeeData struct {
	Fee     uint64  `json:"fee"`
	Percent float32 `json:"percent"`
}

FeeData is the fee for a Lifinity swap transaction

type SwapInstruction

type SwapInstruction struct {
	Determinant      [8]byte
	AmountIn         int64
	MinimumAmountOut int64
}

SwapInstruction is the instruction data of a Lifinity swap transaction

Jump to

Keyboard shortcuts

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