Documentation
¶
Index ¶
- func ErrContentCreatorCoinConversion() sdk.Error
- func ErrDeveloperCoinConversion() sdk.Error
- func ErrFailedToMarshalConsumptionMeta(err error) sdk.Error
- func ErrFailedToMarshalGlobalMeta(err error) sdk.Error
- func ErrFailedToMarshalInflationPool(err error) sdk.Error
- func ErrFailedToMarshalTPS(err error) sdk.Error
- func ErrFailedToMarshalTime(err error) sdk.Error
- func ErrFailedToMarshalTimeEventList(err error) sdk.Error
- func ErrFailedToUnmarshalConsumptionMeta(err error) sdk.Error
- func ErrFailedToUnmarshalGlobalMeta(err error) sdk.Error
- func ErrFailedToUnmarshalInflationPool(err error) sdk.Error
- func ErrFailedToUnmarshalTPS(err error) sdk.Error
- func ErrFailedToUnmarshalTime(err error) sdk.Error
- func ErrFailedToUnmarshalTimeEventList(err error) sdk.Error
- func ErrGlobalConsumptionMetaNotFound() sdk.Error
- func ErrGlobalMetaNotFound() sdk.Error
- func ErrGlobalTPSNotFound() sdk.Error
- func ErrGlobalTimeNotFound() sdk.Error
- func ErrInflationPoolNotFound() sdk.Error
- func ErrInfraInflationCoinConversion() sdk.Error
- func ErrValidatorCoinConversion() sdk.Error
- func GetConsumptionMetaKey() []byte
- func GetGlobalMetaKey() []byte
- func GetInflationPoolKey() []byte
- func GetTPSKey() []byte
- func GetTimeEventListKey(unixTime int64) []byte
- func GetTimeKey() []byte
- type ConsumptionMeta
- type GlobalMeta
- type GlobalStorage
- func (gs GlobalStorage) GetConsumptionMeta(ctx sdk.Context) (*ConsumptionMeta, sdk.Error)
- func (gs GlobalStorage) GetGlobalMeta(ctx sdk.Context) (*GlobalMeta, sdk.Error)
- func (gs GlobalStorage) GetGlobalTime(ctx sdk.Context) (*GlobalTime, sdk.Error)
- func (gs GlobalStorage) GetInflationPool(ctx sdk.Context) (*InflationPool, sdk.Error)
- func (gs GlobalStorage) GetTPS(ctx sdk.Context) (*TPS, sdk.Error)
- func (gs GlobalStorage) GetTimeEventList(ctx sdk.Context, unixTime int64) (*types.TimeEventList, sdk.Error)
- func (gs GlobalStorage) InitGlobalState(ctx sdk.Context, totalLino types.Coin) sdk.Error
- func (gs GlobalStorage) InitGlobalStateWithConfig(ctx sdk.Context, totalLino types.Coin, param InitParamList) sdk.Error
- func (gs GlobalStorage) RemoveTimeEventList(ctx sdk.Context, unixTime int64) sdk.Error
- func (gs GlobalStorage) SetConsumptionMeta(ctx sdk.Context, consumptionMeta *ConsumptionMeta) sdk.Error
- func (gs GlobalStorage) SetGlobalMeta(ctx sdk.Context, globalMeta *GlobalMeta) sdk.Error
- func (gs GlobalStorage) SetGlobalTime(ctx sdk.Context, globalTime *GlobalTime) sdk.Error
- func (gs GlobalStorage) SetInflationPool(ctx sdk.Context, inflationPool *InflationPool) sdk.Error
- func (gs GlobalStorage) SetTPS(ctx sdk.Context, tps *TPS) sdk.Error
- func (gs GlobalStorage) SetTimeEventList(ctx sdk.Context, unixTime int64, lst *types.TimeEventList) sdk.Error
- func (gs GlobalStorage) WireCodec() *wire.Codec
- type GlobalTime
- type InflationPool
- type InitParamList
- type TPS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrFailedToMarshalTPS ¶
func ErrFailedToMarshalTime ¶
func ErrFailedToMarshalTimeEventList ¶
marshal error
func ErrFailedToUnmarshalTPS ¶
func ErrFailedToUnmarshalTimeEventList ¶
unmarshal error
func ErrGlobalMetaNotFound ¶
func ErrGlobalTPSNotFound ¶
func ErrGlobalTimeNotFound ¶
func GetConsumptionMetaKey ¶
func GetConsumptionMetaKey() []byte
func GetGlobalMetaKey ¶
func GetGlobalMetaKey() []byte
func GetInflationPoolKey ¶
func GetInflationPoolKey() []byte
func GetTimeEventListKey ¶
func GetTimeKey ¶
func GetTimeKey() []byte
Types ¶
type ConsumptionMeta ¶
type ConsumptionMeta struct {
ConsumptionFrictionRate sdk.Rat `json:"consumption_friction_rate"`
ConsumptionWindow types.Coin `json:"consumption_window"`
ConsumptionRewardPool types.Coin `json:"consumption_reward_pool"`
ConsumptionFreezingPeriodHr int64 `json:"consumption_freezing_period"`
}
ConsumptionMeta ConsumptionFrictionRate: percentage the user consumption deducted and added to the TotalLinoInflationPool ConsumptionWindow records all content related consumption within the freezing period ConsumptionFreezingPeriodHr is the time content createor can get remain consumption after friction
type GlobalMeta ¶
type GlobalMeta struct {
TotalLinoCoin types.Coin `json:"total_lino_coin"`
LastYearCumulativeConsumption types.Coin `json:"last_year_cumulative_consumption"`
CumulativeConsumption types.Coin `json:"cumulative_consumption"`
GrowthRate sdk.Rat `json:"growth_rate"`
Ceiling sdk.Rat `json:"ceiling"`
Floor sdk.Rat `json:"floor"`
AnnualInflation types.Coin `json:"annual_inflation"`
}
type GlobalStorage ¶
type GlobalStorage struct {
// contains filtered or unexported fields
}
func NewGlobalStorage ¶
func NewGlobalStorage(key sdk.StoreKey) GlobalStorage
func (GlobalStorage) GetConsumptionMeta ¶
func (gs GlobalStorage) GetConsumptionMeta(ctx sdk.Context) (*ConsumptionMeta, sdk.Error)
func (GlobalStorage) GetGlobalMeta ¶
func (gs GlobalStorage) GetGlobalMeta(ctx sdk.Context) (*GlobalMeta, sdk.Error)
func (GlobalStorage) GetGlobalTime ¶
func (gs GlobalStorage) GetGlobalTime(ctx sdk.Context) (*GlobalTime, sdk.Error)
func (GlobalStorage) GetInflationPool ¶
func (gs GlobalStorage) GetInflationPool(ctx sdk.Context) (*InflationPool, sdk.Error)
func (GlobalStorage) GetTimeEventList ¶
func (gs GlobalStorage) GetTimeEventList(ctx sdk.Context, unixTime int64) (*types.TimeEventList, sdk.Error)
func (GlobalStorage) InitGlobalState ¶
func (GlobalStorage) InitGlobalStateWithConfig ¶
func (gs GlobalStorage) InitGlobalStateWithConfig( ctx sdk.Context, totalLino types.Coin, param InitParamList) sdk.Error
func (GlobalStorage) RemoveTimeEventList ¶
func (GlobalStorage) SetConsumptionMeta ¶
func (gs GlobalStorage) SetConsumptionMeta(ctx sdk.Context, consumptionMeta *ConsumptionMeta) sdk.Error
func (GlobalStorage) SetGlobalMeta ¶
func (gs GlobalStorage) SetGlobalMeta(ctx sdk.Context, globalMeta *GlobalMeta) sdk.Error
func (GlobalStorage) SetGlobalTime ¶
func (gs GlobalStorage) SetGlobalTime(ctx sdk.Context, globalTime *GlobalTime) sdk.Error
func (GlobalStorage) SetInflationPool ¶
func (gs GlobalStorage) SetInflationPool(ctx sdk.Context, inflationPool *InflationPool) sdk.Error
func (GlobalStorage) SetTimeEventList ¶
func (gs GlobalStorage) SetTimeEventList(ctx sdk.Context, unixTime int64, lst *types.TimeEventList) sdk.Error
func (GlobalStorage) WireCodec ¶
func (gs GlobalStorage) WireCodec() *wire.Codec
type GlobalTime ¶
type InflationPool ¶
type InflationPool struct {
InfraInflationPool types.Coin `json:"infra_inflation_pool"`
DeveloperInflationPool types.Coin `json:"developer_inflation_pool"`
ValidatorInflationPool types.Coin `json:"validator_inflation_pool"`
}
InflationPool, determined by GlobalAllocation InfraInflationPool inflation pool for infra TotalContentCreatorInflationPool total inflation pool for content creator this year DistributedContentCreatorInflationPool inflation alrady distributed DeveloperInflationPool inflation pool for developer ValidatorInflationPool inflation pool for validator
type InitParamList ¶
type InitParamList struct {
GrowthRate sdk.Rat `json:"growth_rate"`
Ceiling sdk.Rat `json:"ceiling"`
Floor sdk.Rat `json:"floor"`
MaxTPS sdk.Rat `json:"max_tps"`
ConsumptionFrictionRate sdk.Rat `json:"consumption_friction_rate"`
ConsumptionFreezingPeriodHr int64 `json:"consumption_freezing_period"`
}