common

package
v0.0.0-...-bd3dd7f Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDiffPercent

func GetDiffPercent(d1 *decimal.Decimal, d2 *decimal.Decimal) decimal.Decimal

func Handle

func Handle[T any](ctx context.Context, handleItem T, fns []func(ctx context.Context, item T) error) error

func MethodID

func MethodID(method string) string

func ParseEventHashFromCode

func ParseEventHashFromCode(code []byte) ([]string, error)

ParseEventHashFromCode parses event hash from contract code PUSH32 is used to push 32 bytes of data onto the stack

func ParseMethodIDFromCode

func ParseMethodIDFromCode(code []byte) ([]string, error)

ParseMethodIDFromCode parses method id from contract code PUSH3 and PUSH4 are used to push 3 and 4 bytes of data onto the stack

func Retry

func Retry[T any](ctx context.Context, maxRetries uint64, fn func() (T, error)) (T, error)

Types

This section is empty.

Directories

Path Synopsis
Package log implements a simple logging package.
Package log implements a simple logging package.

Jump to

Keyboard shortcuts

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