v0_15

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ModuleName The name that will be used throughout the module
	ModuleName = "pricefeed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GenesisState

type GenesisState struct {
	Params       Params       `json:"params" yaml:"params"`
	PostedPrices PostedPrices `json:"posted_prices" yaml:"posted_prices"`
}

GenesisState - pricefeed state that must be provided at genesis

type Market

type Market struct {
	MarketID   string           `json:"market_id" yaml:"market_id"`
	BaseAsset  string           `json:"base_asset" yaml:"base_asset"`
	QuoteAsset string           `json:"quote_asset" yaml:"quote_asset"`
	Oracles    []sdk.AccAddress `json:"oracles" yaml:"oracles"`
	Active     bool             `json:"active" yaml:"active"`
}

Market an asset in the pricefeed

type Markets

type Markets []Market

Markets array type for oracle

type Params

type Params struct {
	Markets Markets `json:"markets" yaml:"markets"` //  Array containing the markets supported by the pricefeed
}

Params params for pricefeed. Can be altered via governance

type PostedPrice

type PostedPrice struct {
	MarketID      string         `json:"market_id" yaml:"market_id"`
	OracleAddress sdk.AccAddress `json:"oracle_address" yaml:"oracle_address"`
	Price         sdk.Dec        `json:"price" yaml:"price"`
	Expiry        time.Time      `json:"expiry" yaml:"expiry"`
}

PostedPrice price for market posted by a specific oracle

type PostedPrices

type PostedPrices []PostedPrice

PostedPrices type for an array of PostedPrice

Jump to

Keyboard shortcuts

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