token

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoExist      = errors.New("token doesn't exist")
	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  common.Address
	Decimals int64
}

func Decode

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

func NewToken

func NewToken(name string, address common.Address, decimals int64) Token

func (Token) Encode

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

type TokenManager

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

func NewTokenDB

func NewTokenDB(client *ethclient.Client, opts db.Opts) TokenManager

Jump to

Keyboard shortcuts

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