alert

package
v0.0.0-...-77861b7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAlertConfig

func InitAlertConfig()

func LowGasAlert

func LowGasAlert(chid uint64, addr eth.Addr, balance, threshold *big.Int)

func SendSlackMessage

func SendSlackMessage(message string)

Types

type AlertConfig

type AlertConfig struct {
	Type             string
	Webhook          string
	LowGasThresholds []*ChainIdThreshold `mapstructure:"low_gas_thresholds"`
}

func GetConfig

func GetConfig() *AlertConfig

func (*AlertConfig) GetLowGasThreshold

func (a *AlertConfig) GetLowGasThreshold(chid uint64) (*big.Int, bool)

type ChainIdThreshold

type ChainIdThreshold struct {
	ChainID   uint64 `mapstructure:"chain_id"`
	Threshold string
}

type SlackRequest

type SlackRequest struct {
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

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