types

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyETH added in v1.2.1

func PrettyETH(wei *big.Int) string

Types

type Account

type Account struct {
	Name    string
	Private string
	Public  string
}

func (Account) Address

func (a Account) Address() common.Address

func (Account) PrivateKey

func (a Account) PrivateKey() *ecdsa.PrivateKey

type AddressResolver

type AddressResolver interface {
	ResolveAddress(address string) (common.Address, error)
}

type Balance

type Balance interface {
	Balance(ctx context.Context, account common.Address) (*big.Int, error)
	TokenBalance(ctx context.Context, account common.Address, token common.Address) (*big.Int, error)
}

type ChainConfig

type ChainConfig struct {
	Name     string
	Protocol string
	RPCURL   string
	ChainID  int64
}

type Contract

type Contract struct {
	Name    string
	Address string
	Abi     string
	Type    string
	ChainID int64
}

func (Contract) GetAbi

func (c Contract) GetAbi() (parsedAbi abi.ABI, err error)

func (Contract) GetAddress

func (c Contract) GetAddress() common.Address

type Field

type Field struct {
	Name    string
	Value   interface{}
	Printer PrintType
}

func (*Field) String

func (f *Field) String() string

type Item

type Item struct {
	Record
	Header []Field
}

func NewItem

func NewItem() Item

func (Item) GetString

func (i Item) GetString(s string) string

func (Item) GetUint8

func (i Item) GetUint8(s string) uint8

type PrintType added in v1.2.1

type PrintType int
var (
	EthPrintType PrintType = 1
)

type Record

type Record struct {
	Fields []Field
}

func (*Record) AddField

func (f *Record) AddField(name string, value interface{})

type Table

type Table struct {
	Type   string
	Header []Field
	Rows   []Record
}

type WithoutAddressResolution

type WithoutAddressResolution struct {
}

func (WithoutAddressResolution) ResolveAddress

func (WithoutAddressResolution) ResolveAddress(address string) (common.Address, error)

Jump to

Keyboard shortcuts

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