util

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindInnerInstructions

func FindInnerInstructions(meta *rpc.TransactionMeta, index uint64) []solana.CompiledInstruction

func FindInnerInstructionsFromParsedMeta added in v0.8.9

func FindInnerInstructionsFromParsedMeta(meta *rpc.ParsedTransactionMeta, index uint64) []*rpc.ParsedInstruction

func GetComputeUnitPriceFromHelius added in v0.2.2

func GetComputeUnitPriceFromHelius(
	logger i_logger.ILogger,
	key string,
	accountKeys []string,
) (uint64, error)

func GetFeeInfoFromParsedTx added in v0.8.7

func GetFeeInfoFromParsedTx(meta *rpc.ParsedTransactionMeta, parsedTransaction *rpc.ParsedTransaction) (*type_.FeeInfo, error)

func GetFeeInfoFromTx

func GetFeeInfoFromTx(meta *rpc.TransactionMeta, transaction *solana.Transaction) (*type_.FeeInfo, error)

Types

type Stack added in v0.4.5

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

Stack 定义栈结构

func NewStack added in v0.4.5

func NewStack() *Stack

func (*Stack) IsEmpty added in v0.4.5

func (s *Stack) IsEmpty() bool

IsEmpty 判断栈是否为空

func (*Stack) Peek added in v0.4.5

func (s *Stack) Peek() (interface{}, error)

Peek 查看栈顶元素,但不移除它

func (*Stack) Pop added in v0.4.5

func (s *Stack) Pop() (interface{}, error)

Pop 从栈中移除并返回栈顶元素

func (*Stack) Push added in v0.4.5

func (s *Stack) Push(item interface{})

Push 向栈中添加元素

func (*Stack) Size added in v0.4.5

func (s *Stack) Size() int

Size 获取栈的大小

type TransferInstructionDataType added in v0.8.9

type TransferInstructionDataType struct {
	Source             solana.PublicKey
	Destination        solana.PublicKey
	AmountWithDecimals uint64
	Authority          solana.PublicKey
}

func DecodeTransferParsedInstruction added in v0.8.9

func DecodeTransferParsedInstruction(transferInstruction *rpc.ParsedInstruction) (*TransferInstructionDataType, error)

Jump to

Keyboard shortcuts

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