constants

package
v0.0.0-...-0682c63 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP_CLIENT_TIMEOUT_SECONDS = 30

	CYCLE_FETCH_FREQUENCY_MINUTES = 5
	MINIMUM_DIFF_TOLERANCE        = 1

	RPC_INIT_BATCH_SIZE       = 3
	DELEGATE_FETCH_BATCH_SIZE = 4
	CONTRACT_FETCH_BATCH_SIZE = 25

	BALANCE_FETCH_RETRY_DELAY_SECONDS = 20
	BALANCE_FETCH_RETRY_ATTEMPTS      = 3

	LOG_LEVEL              = "LOG_LEVEL"
	LISTEN                 = "LISTEN"
	LISTEN_DEFAULT         = "127.0.0.1:3000"
	PRIVATE_LISTEN         = "PRIVATE_LISTEN"
	PRIVATE_LISTEN_DEFAULT = ""

	STORED_CYCLES = 20
)
View Source
const (
	VERSION  = "0.1.10"
	CODENAME = "ogun"
)

Variables

View Source
var (
	ErrNotFound          = errors.New("not found")
	ErrCycleDidNotEndYet = errors.New("cycle did not end yet")

	ErrDelegateHasNoMinimumDelegatedBalance = errors.New("delegate has no minimum delegated balance")

	ErrFailedToFetchContract                = errors.New("failed to fetch contract")
	ErrFailedToFetchContractBalance         = errors.Join(ErrFailedToFetchContract, errors.New("failed to fetch contract balance"))
	ErrFailedToFetchContractUnstakeRequests = errors.Join(ErrFailedToFetchContract, errors.New("failed to fetch contract unstake requests"))
	ErrFailedToFetchContractDelegated       = errors.Join(ErrFailedToFetchContract, errors.New("failed to fetch contract delegated"))
	ErrBalanceNotFoundInDelegationState     = errors.New("balance not found in delegation state")
	ErrDelegatorNotFoundInDelegationState   = errors.New("delegator not found in delegation state")
	ErrMinimumDelegatedBalanceNotFound      = errors.New("minimum delegated balance not found")
	ErrFailedToFetchContractBalances        = errors.New("failed to fetch contract balances")
	ErrDelegateNotRegistered                = errors.New("delegate not registered")

	ErrUnsupportedNotificator          = errors.New("unsupported notificator")
	ErrPayoutDidNotFitTheBatch         = errors.New("payout did not fit the batch")
	ErrInvalidNotificatorConfiguration = errors.New("invalid notificator configuration")
)
View Source
var (
	IgnoredBalanceUpdateKinds = IgnoredBalanceUpdateKindsType{
		"burned",
	}
)

Functions

This section is empty.

Types

type IgnoredBalanceUpdateKindsType

type IgnoredBalanceUpdateKindsType []string

func (IgnoredBalanceUpdateKindsType) Contains

func (k IgnoredBalanceUpdateKindsType) Contains(kind string) bool

type StorageKind

type StorageKind string
const (
	Archive StorageKind = "archive"
	Rolling StorageKind = "rolling"
)

Jump to

Keyboard shortcuts

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