config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TreasureManager = "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0"
)

Variables

View Source
var (
	TreasureManagerAddr = common.HexToAddress(TreasureManager)
)

Functions

func LoadContracts

func LoadContracts() []common.Address

Types

type ChainConfig

type ChainConfig struct {
	ChainRpcUrl    string
	ChainId        uint
	StartingHeight uint64
	Confirmations  uint64
	BlockStep      uint64
	Contracts      []common.Address
	LoopInterval   time.Duration
}

type Config

type Config struct {
	Migrations     string
	Chain          ChainConfig
	MasterDB       DBConfig
	SlaveDB        DBConfig
	SlaveDbEnable  bool
	ApiCacheEnable bool
	HTTPServer     ServerConfig
}

func LoadConfig

func LoadConfig(cliCtx *cli.Context) (Config, error)

func NewConfig

func NewConfig(ctx *cli.Context) Config

type DBConfig

type DBConfig struct {
	Host     string
	Port     int
	Name     string
	User     string
	Password string
}

type ServerConfig

type ServerConfig struct {
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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