package
2.0.0-rc.9
Repository: https://github.com/nibiruchain/nibiru.git
Documentation: pkg.go.dev

# README

x/common

The x/common directory holds helper and utility functions to be utilized by other x/ cosmos-sdk modules.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package omap defines a generic-based type for creating ordered maps.
No description provided by the author
Package nullify provides methods to init nil values structs for test assertion.

# Functions

No description provided by the author
BankersRound: Banker's rounding is a method commonly used in banking and accounting to reduce roudning bias when processing large volumes of rounded numbers.
BigIntPow10 returns a big int that is a power of 10, e.g.
ChopPrecisionAndRound: Remove a Precision amount of rightmost digits and perform bankers rounding on the remainder (gaussian rounding) on the digits which have been removed.
Clamp return the value if it is within the clampValue, otherwise return the clampValue.
Combines errors into single error.
No description provided by the author
No description provided by the author
ErrNotImplemented: Represents an function error value.
ErrNotImplementedGprc: Represents an unimplemented gRPC method.
MustSqrtBigInt returns the square root of the input.
MustSqrtDec computes the square root of the input decimal using its underlying big.Int.
No description provided by the author
ParsePagination: Validates and cleans a PageRequest to make setting values less error-prone and use Nibiru-specific defaults.
SqrtInt is the panic-safe version of MustSqrtBigInt.
SqrtDec computes the square root of the input decimal using its underlying big.Int.
No description provided by the author
ToError converts a value to an error type if it: (1) is a string, (2) has a String() function (3) is already an error.
TryCatch is an implementation of the try-catch block from languages like C++ and JS.

# Constants

bits required to represent the above precision Ceiling[Log2[10^Precision - 1]].
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
number of decimal places.
TO_MICRO: multiplier for converting between units and micro-units.
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
LegacyDecValue represents a collections.ValueCodec to work with LegacyDec.
No description provided by the author
No description provided by the author
No description provided by the author
TODO: (realu) Move to collections library.
TO_ATTO eth multiplier.