common

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 2

README

x/common

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GovDenom    = "unibi"
	CollDenom   = "uust"
	StableDenom = "unusd"

	TreasuryPoolModuleAccount = "treasury_pool"

	WhitelistedColl = []string{CollDenom}

	GovStablePool  = AssetPair{Token0: GovDenom, Token1: StableDenom}
	CollStablePool = AssetPair{Token0: CollDenom, Token1: StableDenom}
)

Functions

func DenomsFromPoolName

func DenomsFromPoolName(pool string) (denoms []string)

func PoolNameFromDenoms

func PoolNameFromDenoms(denoms []string) string

PoolNameFromDenoms returns a sorted string representing a pool of assets

func RawPoolNameFromDenoms

func RawPoolNameFromDenoms(denoms []string) string

RawPoolNameFromDenoms returns a string representing a pool of assets in the exact order the denoms were given as args

Types

type AssetPair

type AssetPair struct {
	Token0 string
	Token1 string
}

func (AssetPair) Inverse

func (pair AssetPair) Inverse() AssetPair

func (AssetPair) IsProperOrder

func (pair AssetPair) IsProperOrder() bool

func (AssetPair) Name

func (pair AssetPair) Name() string

name is the name of the pool that corresponds to the two assets on this pair.

func (AssetPair) PairID

func (pair AssetPair) PairID() string

func (AssetPair) Proper

func (pair AssetPair) Proper() AssetPair

func (AssetPair) String

func (pair AssetPair) String() string

Jump to

Keyboard shortcuts

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