config

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Bind        string
	RPC         string
	Dev         bool
	Metrics     bool
	Versions    []int
	StartHeight int64
	Tokens      Tokens
	Nodes       Nodes
	Limiter     Limiter
}

func New

func New() *Config

func (*Config) Init

func (p *Config) Init(cfgFile string) error

type ERC20

type ERC20 struct {
	Name     string `json:"name"`     // 代币名称,例如Tool Global Blockchain
	Symbol   string `json:"symbol"`   // 代币symbol,例如OLO
	Decimals int    `json:"decimals"` // 小数位数
	//TotalSupply string `json:"totalSupply"` // 总发行量,整数
	//CreatedAt   string `json:"createdAt"`   // 发行时间
	Address string `json:"address"` // 合约地址
	//Exchange    bool   `json:"exchange"`    // 是否在交易所交易
	//WhitePaper  string `json:"whitePaper"`  // 白皮书
	//Website     string `json:"website"`     // 官网
	Icon string `json:"icon"` // icon url
}

type Limiter

type Limiter struct {
	Interval duration
	Capacity int64
}

type LogInfo

type LogInfo struct {
	Path string
}

type Node

type Node struct {
	Address string `json:"address"` // 节点地址
	Name    string `json:"name"`    // 节点名称
}

type Nodes

type Nodes struct {
	Nodes []Node `json:"nodes"`
}

type Tokens

type Tokens struct {
	Coins []ERC20
}

Jump to

Keyboard shortcuts

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