utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: GPL-3.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALIGN_LENGTH = 32
)

Variables

This section is empty.

Functions

func Align32Bytes

func Align32Bytes(b []byte) []byte

func Align32BytesLittleEndian

func Align32BytesLittleEndian(b []byte) []byte

func Bytes2string

func Bytes2string(b []byte) string

func BytesToInt64

func BytesToInt64(bys []byte) int64

func CatchPanic

func CatchPanic(out *error)

CatchPanic catches any panic and writes the error to out.

func Int32ToBytes

func Int32ToBytes(i int32) []byte

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func String2bytes

func String2bytes(str string) []byte

func Uint64ToBytes

func Uint64ToBytes(n uint64) []byte

func UnifyError

func UnifyError(e interface{}) error

UnifyError converts e to error.

Types

type AbiStruct

type AbiStruct struct {
	Name     string         `json:"name"`
	Inputs   []InputParam   `json:"inputs"`
	Outputs  []OutputsParam `json:"outputs"`
	Constant string         `json:"constant"`
	Type     string         `json:"type"`
}

type InputParam

type InputParam struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type OutputsParam

type OutputsParam struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type WasmAbi

type WasmAbi struct {
	AbiArr []AbiStruct `json:"abiArr"`
}

func (*WasmAbi) FromJson

func (abi *WasmAbi) FromJson(body []byte) error

Jump to

Keyboard shortcuts

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