-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.go
61 lines (51 loc) · 2.47 KB
/
view.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
49
50
51
52
53
54
55
56
57
58
59
60
61
package keeper
import (
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/furynet/xfury/x/strategicreserve/types"
)
// getOrderBookStore gets the store containing all order books.
func (k Keeper) getOrderBookStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.OrderBookKeyPrefix)
}
// getOrderBookStatsStore gets the store containing the statistics.
func (k Keeper) getOrderBookStatsStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.OrderBookStatsKeyPrefix)
}
// getParticipationStore gets the store containing all participations.
func (k Keeper) getParticipationStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.OrderBookParticipationKeyPrefix)
}
// getParticipationExposureStore gets the store containing all participation exposures.
func (k Keeper) getParticipationExposureStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.ParticipationExposureKeyPrefix)
}
// getParticipationExposureByIndexStore gets the store containing all participation exposures by index.
func (k Keeper) getParticipationExposureByIndexStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.ParticipationExposureByIndexKeyPrefix)
}
// getHistoricalParticipationExposureStore gets the store containing all historicalparticipation exposures.
func (k Keeper) getHistoricalParticipationExposureStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.HistoricalParticipationExposureKeyPrefix)
}
// getParticipationBetPairStore gets the store containing all participation bet pair.
func (k Keeper) getParticipationBetPairStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.ParticipationBetPairKeyPrefix)
}
// getOrderBookOddsExposureStore gets the store containing all book odds exposure.
func (k Keeper) getOrderBookOddsExposureStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.OrderBookOddsExposureKeyPrefix)
}
// getPayoutLockStore gets the store containing all payout locks.
func (k Keeper) getPayoutLockStore(ctx sdk.Context) prefix.Store {
store := ctx.KVStore(k.storeKey)
return prefix.NewStore(store, types.PayoutLockKeyPrefix)
}