appconst

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: BSD-2-Clause Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package appconst defines global constants and utility functions used throughout the Nibiru application.

Index

Constants

View Source
const (
	BinaryName = "nibiru"

	// DENOM_UNIBI is the micro-denomination used by x/bank for NIBI balances.
	// One unibi = 10^{-6} NIBI. [DENOM_UNIBI] is the Bank Coin denomination for
	// staking, governance, and gas.
	//
	// The aggregate, 18 decimal, EVM-facing precision comes from combining this
	// with the wei remainder store at 10^{12} wei per unibi. Equivalently, wei
	// is defined as attoNIBI. Thus,
	// 1 NIBI = 10^{18} attoNIBI = 10 = 10^{18} wei = 10^{6} microNIBI.
	DENOM_UNIBI = "unibi"

	// AccountAddressPrefix: Bech32 prefix for Nibiru accounts.
	AccountAddressPrefix = "nibi"

	// ADDR_LEN_EOA is the length (number of bytes) of an [e]xternally [o]wned
	// [a]ccount.
	ADDR_LEN_EOA = 20 // wasm.SDKAddrLen
	// ADDR_LEN_WASM_CONTRACT is the length (number of bytes) of a wasm contract
	// address.
	ADDR_LEN_WASM_CONTRACT = wasm.ContractAddrLen
)
View Source
const (
	// SDK_CHAIN_ID_MAINNET is the CometBFT / Cosmos SDK chain ID for Nibiru mainnet.
	SDK_CHAIN_ID_MAINNET = "cataclysm-1"

	ETH_CHAIN_ID_MAINNET int64 = 6900

	ETH_CHAIN_ID_TESTNET_1 int64 = 7210
	ETH_CHAIN_ID_TESTNET_2 int64 = 6911
	ETH_CHAIN_ID_TESTNET_3 int64 = 6912

	ETH_CHAIN_ID_DEVNET_1 int64 = 6920
	ETH_CHAIN_ID_DEVNET_2 int64 = 6921
	ETH_CHAIN_ID_DEVNET_3 int64 = 6922

	ETH_CHAIN_ID_LOCALNET_0 int64 = 6930
	ETH_CHAIN_ID_LOCALNET_1 int64 = 6931
	ETH_CHAIN_ID_LOCALNET_2 int64 = 6932
	ETH_CHAIN_ID_LOCALNET_3 int64 = 6933

	ETH_CHAIN_ID_DEFAULT int64 = 6930
)

EIP 155 Chain IDs for Nibiru

Variables

View Source
var (
	DefaultDBBackend     db.BackendType = db.PebbleDBBackend
	HavePebbleDBBuildTag bool

	// MAINNET_WNIBI_ADDR is the (real) hex address of WNIBI on mainnet. NIBI acts as
	// "ether" in the Nibiru EVM state. WNIBI is the Nibiru equivalent of WETH on
	// Ethereum.
	MAINNET_WNIBI_ADDR = gethcommon.HexToAddress("0x0CaCF669f8446BeCA826913a3c6B96aCD4b02a97")

	// MAINNET_STNIBI_ADDR is the (real) hex address of stNIBI on mainnet.
	MAINNET_STNIBI_ADDR = gethcommon.HexToAddress("0xcA0a9Fb5FBF692fa12fD13c0A900EC56Bb3f0a7b")
)

Functions

func GetEthChainID

func GetEthChainID(ctxChainID string) (ethChainID *big.Int)

GetEthChainID: Maps the given chain ID from the block's `sdk.Context` to an EVM Chain ID (`*big.Int`).

func NewDefaultTendermintConfig

func NewDefaultTendermintConfig() *cmtcfg.Config

NewDefaultTendermintConfig returns a consensus "Config" (CometBFT) with new default values for the "consensus" and "db_backend" fields to be enforced upon node initialization. See the "nibiru/x/cli/InitCmd" function for more information.

func RuntimeVersion

func RuntimeVersion() string

RuntimeVersion returns a formatted string with versioning and build metadata, including the Nibiru version, Git commit, Go runtime, architecture, and build tags.

Types

This section is empty.

Jump to

Keyboard shortcuts

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