token

package
v0.0.0-...-19dd61d Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotConnected = errors.New("not connected to a chain, use Connect method")
)

Functions

This section is empty.

Types

type Token

type Token struct {
	Symbol   string
	Address  string
	Decimals int64
}

func Decode

func Decode(poolBytes []byte) (Token, error)

func NewToken

func NewToken(name string, address string, decimals int64) Token

func (Token) Encode

func (t Token) Encode() ([]byte, error)

type TokenManager

type TokenManager interface {
	GetToken(ctx context.Context, address string) (Token, error)
}

func NewTokenDB

func NewTokenDB(client *ethclient.Client) TokenManager

Jump to

Keyboard shortcuts

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