-
Notifications
You must be signed in to change notification settings - Fork 85
/
types.go
48 lines (40 loc) · 1.28 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package types
import (
"github.com/cometbft/cometbft/libs/log"
sdk "github.com/cosmos/cosmos-sdk/types"
)
type PricesKeeper interface {
// Market related.
CreateMarket(
ctx sdk.Context,
param MarketParam,
price MarketPrice,
) (createdMarketParam MarketParam, err error)
ModifyMarketParam(
ctx sdk.Context,
param MarketParam,
) (updatedMarketParam MarketParam, err error)
UpdateMarketPrices(
ctx sdk.Context,
updates []*MsgUpdateMarketPrices_MarketPrice,
) (err error)
GetAllMarketParamPrices(ctx sdk.Context) (marketPramPrices []MarketParamPrice, err error)
GetMarketParam(ctx sdk.Context, id uint32) (marketParam MarketParam, exists bool)
GetMarketIdToValidIndexPrice(ctx sdk.Context) (marketIdToIndexPrice map[uint32]MarketPrice)
GetAllMarketParams(ctx sdk.Context) (marketParams []MarketParam)
GetMarketPrice(ctx sdk.Context, id uint32) (marketPrice MarketPrice, err error)
GetAllMarketPrices(ctx sdk.Context) (marketPrices []MarketPrice)
HasAuthority(authority string) bool
// Validation related.
PerformStatefulPriceUpdateValidation(
ctx sdk.Context,
marketPriceUpdates *MsgUpdateMarketPrices,
performNonDeterministicValidation bool,
) error
// Proposal related.
UpdateSmoothedPrices(
ctx sdk.Context,
) error
// Misc.
Logger(ctx sdk.Context) log.Logger
}