util

package
v0.0.0-...-a1ac4f3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressCompare

func AddressCompare(_p1 string, _p2 *model.Address) bool

func AddressCompareFromTo

func AddressCompareFromTo(_address string, _from *model.Address, _to *model.Address) bool

func ComputeGasOverestimationBurn

func ComputeGasOverestimationBurn(gasUsed, gasLimit int64) (int64, int64)

ComputeGasOverestimationBurn computes amount of gas to be refunded and amount of gas to be burned Result is (refund, burn)

func Min

func Min(a, b int) int

Types

type Config

type Config struct {
	Port         int    `mapstructure:"PORT"`
	DbConn       string `mapstructure:"DB_CONN"`
	DbHost       string `mapstructure:"DB_HOST"`
	DbPort       int    `mapstructure:"DB_PORT"`
	DbUser       string `mapstructure:"DB_USER"`
	DbPassword   string `mapstructure:"DB_PASSWORD"`
	DbDatabase   string `mapstructure:"DB_DATABASE"`
	DbSchema     string `mapstructure:"DB_SCHEMA"`
	LotusToken   string `mapstructure:"LOTUS_TOKEN"`
	LotusAddress string `mapstructure:"LOTUS_ADDR"`
	SentryDns    string `mapstructure:"SENTRY_DSN"`
}

Config stores all configuration of the application. The values are read by viper from a config file or environment variable.

func LoadConfig

func LoadConfig(path string) (config Config, err error)

LoadConfig reads configuration from file or environment variables.

Jump to

Keyboard shortcuts

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