constants

package
v1.2.1-alpha-1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventBridgeConfigUpdate          = "config.bridge.update"
	BridgeConfigUpdateEventParamsKey = "params"
	ClientsEventPriority             = event.Max
	AssetServicePriority             = event.High
	ServiceEventPriority             = event.AboveNormal
	WatcherEventPriority             = event.Normal
	HandlerEventPriority             = event.BelowNormal
)
View Source
const (
	EvmCompatibleAddressPattern = "^(0x)?[0-9a-fA-F]{40}$"
	EvmDefaultDecimals          = uint8(18)
	TransactionHashLength       = 64
)
View Source
const (
	FeeMaxPercentage = 100000
	FeeMinPercentage = 0
)
View Source
const (
	Hbar                  = "HBAR"
	HederaDefaultDecimals = uint8(8)
	HederaName            = "Hedera"
	OldHederaNetworkId    = uint64(0)
)
View Source
const (
	HederaFeeTransfer               = "HEDERA_FEE_TRANSFER"            // WEVM -> NH
	HederaTransferMessageSubmission = "HEDERA_TRANSFER_MSG_SUBMISSION" // NH -> WEVM
	HederaBurnMessageSubmission     = "BURN_TOPIC_MSG_SUBMISSION"      // WH -> NEVM
	HederaMintHtsTransfer           = "HEDERA_MINT_HTS_TRANSFER"       // NEVM -> WH
	HederaNativeNftTransfer         = "HEDERA_NATIVE_NFT_TRANSFER"     // NH NFT -> WEVM
	HederaNftTransfer               = "HEDERA_NFT_TRANSFER"            // WEVM NFT -> NH
	TopicMessageSubmission          = "TOPIC_MSG_SUBMISSION"           // WEVM -> WEVM
	TopicMessageValidation          = "TOPIC_MSG_VALIDATION"           // Messages coming from HCS Topic submission
)

Handler topics

View Source
const (
	ReadOnlyHederaFeeTransfer       = "READ_ONLY_HEDERA_FEE_TRANSFER"        // NH -> WEVM
	ReadOnlyHederaTransfer          = "READ_ONLY_HEDERA_NATIVE_TRANSFER"     // WEVM -> NH
	ReadOnlyHederaBurn              = "READ_ONLY_HEDERA_BURN"                // WH -> NEVM
	ReadOnlyHederaMintHtsTransfer   = "READ_ONLY_HEDERA_MINT_HTS_TRANSFER"   // NEVM -> WH
	ReadOnlyTransferSave            = "READ_ONLY_SAVE_TRANSFER"              // WEVM -> WEVM
	ReadOnlyHederaNativeNftTransfer = "READ_ONLY_HEDERA_NFT_TRANSFER"        // NH NFT -> WEVM
	ReadOnlyHederaUnlockNftTransfer = "READ_ONLY_HEDERA_UNLOCK_NFT_TRANSFER" // WEVM NFT -> NH
)

Read-only handler topics

View Source
const (
	ValidatorsParticipationRateInitialValue = 100
	ValidatorsParticipationRateGaugeName    = "validators_participation_rate"
	ValidatorsParticipationRateGaugeHelp    = "Participation rate: Track validators' activity in %."
	FeeAccountAmountGaugeName               = "fee_account_amount"
	FeeAccountAmountGaugeHelp               = "Fee account amount."
	BridgeAccountAmountGaugeName            = "bridge_account_amount"
	BridgeAccountAmountGaugeHelp            = "Bridge account amount."
	AccountBalanceGaugeNamePrefix           = "account_balance_for_"
	AccountBalanceGaugeHelpPrefix           = "Account balance for "
	DotSymbol                               = "." // not fit prometheus validation https://github.com/prometheus/common/blob/main/model/metric.go#L97
	DashSymbol                              = "-" // not fit prometheus validation https://github.com/prometheus/common/blob/main/model/metric.go#L97
	OpenSquareBracket                       = "[" // not fit prometheus validation https://github.com/prometheus/common/blob/main/model/metric.go#L97
	CloseSquareBracket                      = "]" // not fit prometheus validation https://github.com/prometheus/common/blob/main/model/metric.go#L97
	Space                                   = " " // not fit prometheus validation https://github.com/prometheus/common/blob/main/model/metric.go#L97
	NotAllowedSymbolsReplacement            = "_"
	DotSymbolRep                            = 2
	DashSymbolRep                           = 2
	NoLimitRep                              = -1
	AssetMetricsNamePrefix                  = "asset_id_"
	SupplyAssetMetricNameSuffix             = "_total_supply_"
	SupplyAssetMetricsHelpPrefix            = "total supply"
	BalanceAssetMetricNameSuffix            = "_balance_"
	BalanceAssetMetricHelpPrefix            = "balance"
	AssetMetricLabelKey                     = "symbol"
	AccountMetricLabelKey                   = "account_id"
	NameMetricLabelKey                      = "name"
	FungibleAddon                           = "Fungible"
	NonFungibleAddon                        = "NonFungible"

	CreateDecimalPrefix = "1"
	CreateDecimalRepeat = "0"

	PrometheusMetricsEndpoint = "/metrics"

	MajorityReachedNameSuffix  = "majority_reached"
	MajorityReachedHelp        = "Majority reached for hedera transaction."
	FeeTransferredNameSuffix   = "fee_transferred"
	FeeTransferredHelp         = "Fee transferred to the bridge account."
	UserGetHisTokensNameSuffix = "user_get_his_tokens"
	UserGetHisTokensHelp       = "The user get his tokens after bridging."
)

Prometheus metrics

View Source
const (
	Native  = "Native"
	Wrapped = "Wrapped"
)
View Source
const WhiteSpacesPattern = `\s+`

Variables

View Source
var (
	NetworksById = map[uint64]string{}

	NetworksByName = map[string]uint64{}
)
View Source
var (
	FeeMaxPercentageBigInt = big.NewInt(FeeMaxPercentage)
)
View Source
var (
	HederaNetworkId = uint64(296) // Default Testnet
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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