func (ps PriceStorage) SetPriceHistory(ctx sdk.Context, prices []TimePrice) {
	store := ctx.KVStore(ps.key)
	bytes := ps.cdc.MustMarshalBinaryLengthPrefixed(prices)
	store.Set(GetPriceHistoryKey(), bytes)
}
SetPriceHistory - set price history.
package model
import (
	wire "github.com/cosmos/cosmos-sdk/codec"
	sdk "github.com/cosmos/cosmos-sdk/types"
	linotypes "github.com/lino-network/lino/types"
	"github.com/lino-network/lino/x/price/types"
)
var (
	fedPriceSubStore       = []byte{0x00}  
	priceHistorySubStore   = []byte{0x01}  
	currentPriceSubStore   = []byte{0x02}  
	lastValidatorsSubStore = []byte{0x03}  
	feedHistorySubStore    = []byte{0x04}  
)
func GetFedPriceKey(u linotypes.AccountKey) []byte {
	return append(fedPriceSubStore, u...)
}
func GetPriceHistoryKey() []byte {
	return priceHistorySubStore
}
func GetCurrentPriceKey() []byte {
	return currentPriceSubStore
}
func GetLastValidatorsKey() []byte {
	return lastValidatorsSubStore
}
func GetFeedHistoryKey() []byte {
	return feedHistorySubStore
}
type PriceStorage struct {
	key sdk.StoreKey
	cdc *wire.Codec
}
func NewPriceStorage(key sdk.StoreKey) PriceStorage {
	cdc := wire.New()
	wire.RegisterCrypto(cdc)
	return PriceStorage{
		key: key,
		cdc: cdc,
	}
}
func (ps PriceStorage) GetFedPrice(ctx sdk.Context, val linotypes.AccountKey) (*FedPrice, sdk.Error) {
	store := ctx.KVStore(ps.key)
	key := GetFedPriceKey(val)
	infoByte := store.Get(key)
	if infoByte == nil {
		return nil, types.ErrFedPriceNotFound(val)
	}
	price := new(FedPrice)
	ps.cdc.MustUnmarshalBinaryLengthPrefixed(infoByte, price)
	return price, nil
}
func (ps PriceStorage) SetFedPrice(ctx sdk.Context, price *FedPrice) {
	store := ctx.KVStore(ps.key)
	bytes := ps.cdc.MustMarshalBinaryLengthPrefixed(*price)
	store.Set(GetFedPriceKey(price.Validator), bytes)
}
func (ps PriceStorage) GetPriceHistory(ctx sdk.Context) []TimePrice {
	store := ctx.KVStore(ps.key)
	key := GetPriceHistoryKey()
	bytes := store.Get(key)
	if bytes == nil {
		return nil
	}
	price := make([]TimePrice, 0)
	ps.cdc.MustUnmarshalBinaryLengthPrefixed(bytes, &price)
	return price
}