contract

package
v0.0.0-...-1369677 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(endpoint string, contract Contract) (*defaultClient, error)

Types

type Config

type Config struct {
	Endpoint string `toml:"endpoint" json:"endpoint"`
	Contract string `toml:"contract" json:"contract"`
}

type Contract

type Contract interface {
	GetOwner(tokenId string) (string, error)
}

type Erc

type Erc interface {
	// BalanceAt 账户的余额
	BalanceAt(ctx context.Context, account string) (*big.Int, error)
	// PendingBalanceAt 待处理的余额
	PendingBalanceAt(ctx context.Context, account string) (*big.Int, error)
	// BalanceAtBlock 某区块时的账户余额
	BalanceAtBlock(ctx context.Context, account string, blockNumber int64) (*big.Int, error)
	// GenerateKey 生成公私钥
	GenerateKey() (string, string, error)
	Contract
}

func NewErc

func NewErc(c *Config) (Erc, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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