tips

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tips provides helpers for interacting with the on-chain tip registry contract.

Index

Constants

View Source
const TipSplitterABI = `` /* 1113-byte string literal not displayed */

TipSplitterABI is the minimal ABI required for host registry + allowlist operations.

Variables

This section is empty.

Functions

func DecodeIsTokenAllowedResult

func DecodeIsTokenAllowedResult(ret []byte) (bool, error)

DecodeIsTokenAllowedResult decodes the return data of TipSplitter.allowedTokens(token).

func EncodeGetHostCall

func EncodeGetHostCall(hostID common.Hash) ([]byte, error)

EncodeGetHostCall returns ABI-encoded call data for TipSplitter.hosts(hostId).

func EncodeIsTokenAllowedCall

func EncodeIsTokenAllowedCall(token common.Address) ([]byte, error)

EncodeIsTokenAllowedCall returns ABI-encoded call data for TipSplitter.allowedTokens(token).

func EncodeRegisterHostCall

func EncodeRegisterHostCall(hostID common.Hash, wallet common.Address, feeBps uint16) ([]byte, error)

EncodeRegisterHostCall returns ABI-encoded call data for TipSplitter.registerHost.

func EncodeSetHostActiveCall

func EncodeSetHostActiveCall(hostID common.Hash, active bool) ([]byte, error)

EncodeSetHostActiveCall returns ABI-encoded call data for TipSplitter.setHostActive.

func EncodeSetTokenAllowedCall

func EncodeSetTokenAllowedCall(token common.Address, allowed bool) ([]byte, error)

EncodeSetTokenAllowedCall returns ABI-encoded call data for TipSplitter.setTokenAllowed.

func EncodeUpdateHostCall

func EncodeUpdateHostCall(hostID common.Hash, wallet common.Address, feeBps uint16) ([]byte, error)

EncodeUpdateHostCall returns ABI-encoded call data for TipSplitter.updateHost.

func HostIDFromDomain

func HostIDFromDomain(normalizedDomain string) common.Hash

HostIDFromDomain returns the on-chain hostId (bytes32) for a normalized domain.

The canonical hostId is keccak256(utf8(normalizedDomain)).

Types

type HostConfig

type HostConfig struct {
	Wallet   common.Address
	FeeBps   uint16
	IsActive bool
}

HostConfig is the decoded host registry entry from TipSplitter.hosts(hostId).

func DecodeGetHostResult

func DecodeGetHostResult(ret []byte) (*HostConfig, error)

DecodeGetHostResult decodes the return data of TipSplitter.hosts(hostId).

Jump to

Keyboard shortcuts

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