utils

package
v0.0.0-...-c18bf6f Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ProgramDataPrefix = "Program data: "

for solana

Variables

View Source
var (
	Tron = tron{}
)

Functions

func AmountToStr

func AmountToStr(_decimals int64, amount *big.Int) *big.Float

func BigIntToDecimal

func BigIntToDecimal(b *big.Int, decimalPlaces int32) decimal.Decimal

func EventAddressHashFormat

func EventAddressHashFormat(h common.Hash) string

func GetMethodHash

func GetMethodHash(obj any) []byte

func GetMethodHashString

func GetMethodHashString(obj any) string

func SigHash

func SigHash(instructName string) [8]byte

SigHash for solana

func SigHashEvent

func SigHashEvent(instructName string) [8]byte

SigHashEvent for solana

func ToValidateAddress

func ToValidateAddress(address string) string

func UnmarshalBorsh

func UnmarshalBorsh(dataBytes []byte, obj any) error

UnmarshalBorsh for solana

Types

This section is empty.

Jump to

Keyboard shortcuts

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