config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Minimum allowed deposit in Bahamut chain
	MinDepositAmount uint64 = (1 << 8) * GweiPerEther
	// Maximum allowed deposit in Bahamut chain
	MaxDepositAmount uint64 = (1 << 13) * GweiPerEther
	// Token suffix
	TokenSuffix = "FTN"
)
View Source
const (
	MainnetName                  = "mainnet"
	SaharaName                   = "sahara"
	MainnetGenesisForkVersion    = "00003341"
	MainnetGenesisValidatorsRoot = "de82e35df831fe1dd9cf93ebc6e09fb042eeb852b448e09d2e3c5ed6b918e038"
)

Bahamut Mainnet (Sahara) config

View Source
const (
	HorizonName                  = "horizon"
	HorizonGenesisForkVersion    = "00001934"
	HorizonGenesisValidatorsRoot = "8337cc21ab2223ff7645964cb705d9ea09a3da9c2936ac89209d998e1494fd42"
)

Horizon testnet config

View Source
const (
	// 1 Ether = 1.000.000.000 Gwei
	GweiPerEther = 1e9

	// Prefix used in BLS withdrawal credentials
	BLSWithdrawalPrefix = 0x00

	// Prefix used in execution address withdrawal credentials
	ExecutionAddressWithdrawalPrefix = 0x01

	// Execution address length
	ExecutionAddressLength = 20

	// Sha256 hash length
	HashLength = 32

	// Fork version length
	ForkVersionLength = 4

	GweiSuffix = "GWEI"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainConfig

type ChainConfig struct {
	Name                  string
	GenesisForkVersion    []byte
	GenesisValidatorsRoot []byte
}

Chain config

func ConfigByNetworkName

func ConfigByNetworkName(network string) (*ChainConfig, bool)

ConfigByNetworkName

func HorizonConfig

func HorizonConfig() *ChainConfig

HorizonConfig

func MainnetConfig

func MainnetConfig() *ChainConfig

MainnetConfig

func SaharaConfig

func SaharaConfig() *ChainConfig

SaharaConfig

func (*ChainConfig) UnmarshalJSON

func (cfg *ChainConfig) UnmarshalJSON(data []byte) error

type ChainConfigJSON

type ChainConfigJSON struct {
	Name                  string      `json:"name"`
	GenesisForkVersion    helpers.Hex `json:"genesis_fork_version"`
	GenesisValidatorsRoot helpers.Hex `json:"genesis_validators_root"`
}

Jump to

Keyboard shortcuts

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