parser

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedLispTuple = errors.New("malformed lisp tuple: unexpected type in tuple structure")

ErrMalformedLispTuple is returned when the tuple structure doesn't match the expected lisp list format.

Functions

func ParseLispTuple

func ParseLispTuple[T lispTupleItem](tuple []any) ([]T, error)

ParseLispTuple parses the result of a get method call that returns a Lisp-style list. T must be one of the types that ExecutionResult returns: *big.Int, *cell.Cell, or *cell.Slice. Returns an error if the tuple structure is malformed (e.g., unexpected types), which can indicate ABI mismatches or contract regressions. An empty input tuple returns nil without error.

To convert []*big.Int to []uint64, use lo.Map:

selectors := lo.Map(result, func(x *big.Int, _ int) uint64 { return x.Uint64() })

Types

This section is empty.

Jump to

Keyboard shortcuts

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