utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToTopics

func ConvertToTopics(signatures [][]string) [][]string

func FormatDuration

func FormatDuration(d time.Duration) string

func FormatNumber

func FormatNumber(n uint64) string

func FunctionSignatureToTopic

func FunctionSignatureToTopic(signature string) string

FunctionSignatureTopic converts a funciton signature to its Keccak256 Example: "Transfer(address,address,uint256)" -> "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"

func HexQtyToUint64

func HexQtyToUint64(s string) (uint64, error)

func Keccak256

func Keccak256(data []byte) []byte

Keccak256 computes the Keccak256 hash of input data

func Normalize

func Normalize(address string) string

Normalize converts address to lower case and trim the first two character "0x"

func Uint64ToHexQty

func Uint64ToHexQty(n uint64) string

Helpers (hex quantity <-> uint64)

Types

This section is empty.

Jump to

Keyboard shortcuts

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