abi

package
v0.9.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildABIFields

func BuildABIFields(structType any) ([]abi.ArgumentMarshaling, error)

BuildABIFields constructs ABI ArgumentMarshaling slice from a struct type using reflection It uses the "abiarg" tag to determine field names and optionally types Tag format: `abiarg:"fieldName"` or `abiarg:"fieldName,type"` If type is omitted, it will be inferred from the Go type

func DecodeABIEncodedStructArray

func DecodeABIEncodedStructArray[T any](encodedBytes []byte) ([]T, error)

DecodeABIEncodedStructArray is a generic helper that decodes ABI-encoded tuple array It handles the ABI unpacking and type conversion boilerplate

func EncodeABIStructArray

func EncodeABIStructArray[T any](items []T) ([]byte, error)

EncodeABIStructArray is a generic helper that encodes a slice of structs to ABI-encoded tuple array It automatically builds ABI fields from the struct type using reflection and abiarg tags

Types

This section is empty.

Jump to

Keyboard shortcuts

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