Documentation ¶
Index ¶
- Constants
- func ActivatedParamKey(ty string) string
- func DefaultPrecison(amount int64) sdk.Int
- func Get(ctx sdk.Context, k Getter, key string, ptr interface{}) error
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
- func InitParamGenesis(ctx sdk.Context, k Keeper, state ParamGenesisState)
- func NewAnteHandler(k Keeper) sdk.AnteHandler
- func Pow10(y int) sdk.Int
- func ToBigCoin(ctx sdk.Context, k Getter, coin types.Coin) (types.Coin, error)
- type BuildStoreKey
- type CoinConfig
- type GenesisState
- type Getter
- func (k Getter) Get(ctx sdk.Context, key string, ptr interface{}) error
- func (k Getter) GetBool(ctx sdk.Context, key string) (res bool, err error)
- func (k Getter) GetBoolWithDefault(ctx sdk.Context, key string, def bool) (res bool)
- func (k Getter) GetInt(ctx sdk.Context, key string) (res sdk.Int, err error)
- func (k Getter) GetInt16(ctx sdk.Context, key string) (res int16, err error)
- func (k Getter) GetInt16WithDefault(ctx sdk.Context, key string, def int16) (res int16)
- func (k Getter) GetInt32(ctx sdk.Context, key string) (res int32, err error)
- func (k Getter) GetInt32WithDefault(ctx sdk.Context, key string, def int32) (res int32)
- func (k Getter) GetInt64(ctx sdk.Context, key string) (res int64, err error)
- func (k Getter) GetInt64WithDefault(ctx sdk.Context, key string, def int64) (res int64)
- func (k Getter) GetIntWithDefault(ctx sdk.Context, key string, def sdk.Int) (res sdk.Int)
- func (k Getter) GetRat(ctx sdk.Context, key string) (res sdk.Rat, err error)
- func (k Getter) GetRatWithDefault(ctx sdk.Context, key string, def sdk.Rat) (res sdk.Rat)
- func (k Getter) GetRaw(ctx sdk.Context, key string) []byte
- func (k Getter) GetString(ctx sdk.Context, key string) (res string, err error)
- func (k Getter) GetStringWithDefault(ctx sdk.Context, key string, def string) (res string)
- func (k Getter) GetUint(ctx sdk.Context, key string) (res sdk.Uint, err error)
- func (k Getter) GetUint16(ctx sdk.Context, key string) (res uint16, err error)
- func (k Getter) GetUint16WithDefault(ctx sdk.Context, key string, def uint16) (res uint16)
- func (k Getter) GetUint32(ctx sdk.Context, key string) (res uint32, err error)
- func (k Getter) GetUint32WithDefault(ctx sdk.Context, key string, def uint32) (res uint32)
- func (k Getter) GetUint64(ctx sdk.Context, key string) (res uint64, err error)
- func (k Getter) GetUint64WithDefault(ctx sdk.Context, key string, def uint64) (res uint64)
- func (k Getter) GetUintWithDefault(ctx sdk.Context, key string, def sdk.Uint) (res sdk.Uint)
- type GetterProxy
- func (proxy GetterProxy) Get(ctx sdk.Context, key string, res interface{}) (err error)
- func (proxy GetterProxy) GetBool(ctx sdk.Context, key string) (res bool, err error)
- func (proxy GetterProxy) GetBoolWithDefault(ctx sdk.Context, key string, def bool) (res bool)
- func (proxy GetterProxy) GetInt(ctx sdk.Context, key string) (res sdk.Int, err error)
- func (proxy GetterProxy) GetInt16(ctx sdk.Context, key string) (res int16, err error)
- func (proxy GetterProxy) GetInt16WithDefault(ctx sdk.Context, key string, def int16) (res int16)
- func (proxy GetterProxy) GetInt32(ctx sdk.Context, key string) (res int32, err error)
- func (proxy GetterProxy) GetInt32WithDefault(ctx sdk.Context, key string, def int32) (res int32)
- func (proxy GetterProxy) GetInt64(ctx sdk.Context, key string) (res int64, err error)
- func (proxy GetterProxy) GetInt64WithDefault(ctx sdk.Context, key string, def int64) (res int64)
- func (proxy GetterProxy) GetIntWithDefault(ctx sdk.Context, key string, def sdk.Int) (res sdk.Int)
- func (proxy GetterProxy) GetRat(ctx sdk.Context, key string) (res sdk.Rat, err error)
- func (proxy GetterProxy) GetRatWithDefault(ctx sdk.Context, key string, def sdk.Rat) (res sdk.Rat)
- func (proxy GetterProxy) GetRaw(ctx sdk.Context, key string) []byte
- func (proxy GetterProxy) GetString(ctx sdk.Context, key string) (res string, err error)
- func (proxy GetterProxy) GetStringWithDefault(ctx sdk.Context, key string, def string) (res string)
- func (proxy GetterProxy) GetUint(ctx sdk.Context, key string) (res sdk.Uint, err error)
- func (proxy GetterProxy) GetUint16(ctx sdk.Context, key string) (res uint16, err error)
- func (proxy GetterProxy) GetUint16WithDefault(ctx sdk.Context, key string, def uint16) (res uint16)
- func (proxy GetterProxy) GetUint32(ctx sdk.Context, key string) (res uint32, err error)
- func (proxy GetterProxy) GetUint32WithDefault(ctx sdk.Context, key string, def uint32) (res uint32)
- func (proxy GetterProxy) GetUint64(ctx sdk.Context, key string) (res uint64, err error)
- func (proxy GetterProxy) GetUint64WithDefault(ctx sdk.Context, key string, def uint64) (res uint64)
- func (proxy GetterProxy) GetUintWithDefault(ctx sdk.Context, key string, def sdk.Uint) (res sdk.Uint)
- func (proxy GetterProxy) GovGetter() GetterProxy
- type Keeper
- type ParamGenesisState
- type Setter
- func (k Setter) Set(ctx sdk.Context, key string, param interface{}) error
- func (k Setter) SetBool(ctx sdk.Context, key string, param bool)
- func (k Setter) SetInt(ctx sdk.Context, key string, param sdk.Int)
- func (k Setter) SetInt16(ctx sdk.Context, key string, param int16)
- func (k Setter) SetInt32(ctx sdk.Context, key string, param int32)
- func (k Setter) SetInt64(ctx sdk.Context, key string, param int64)
- func (k Setter) SetRat(ctx sdk.Context, key string, param sdk.Rat)
- func (k Setter) SetRaw(ctx sdk.Context, key string, param []byte)
- func (k Setter) SetString(ctx sdk.Context, key string, param string)
- func (k Setter) SetUint(ctx sdk.Context, key string, param sdk.Uint)
- func (k Setter) SetUint16(ctx sdk.Context, key string, param uint16)
- func (k Setter) SetUint32(ctx sdk.Context, key string, param uint32)
- func (k Setter) SetUint64(ctx sdk.Context, key string, param uint64)
- type SetterProxy
- func (proxy SetterProxy) GovSetter() SetterProxy
- func (proxy SetterProxy) Set(ctx sdk.Context, key string, param interface{}) error
- func (proxy SetterProxy) SetBool(ctx sdk.Context, key string, param bool)
- func (proxy SetterProxy) SetInt(ctx sdk.Context, key string, param sdk.Int)
- func (proxy SetterProxy) SetInt16(ctx sdk.Context, key string, param int16)
- func (proxy SetterProxy) SetInt32(ctx sdk.Context, key string, param int32)
- func (proxy SetterProxy) SetInt64(ctx sdk.Context, key string, param int64)
- func (proxy SetterProxy) SetRat(ctx sdk.Context, key string, param sdk.Rat)
- func (proxy SetterProxy) SetRaw(ctx sdk.Context, key string, param []byte)
- func (proxy SetterProxy) SetString(ctx sdk.Context, key string, param string)
- func (proxy SetterProxy) SetUint(ctx sdk.Context, key string, param sdk.Uint)
- func (proxy SetterProxy) SetUint16(ctx sdk.Context, key string, param uint16)
- func (proxy SetterProxy) SetUint32(ctx sdk.Context, key string, param uint32)
- func (proxy SetterProxy) SetUint64(ctx sdk.Context, key string, param uint64)
Constants ¶
const ( Gov = "gov" Global = "global" )
const IrisDenom = "iris"
const IrisPrecision = 18
Variables ¶
This section is empty.
Functions ¶
func ActivatedParamKey ¶
ActivatedParamKey - paramstore key for msg type activation
func DefaultPrecison ¶
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
InitGenesis stores activated type to param store
func InitParamGenesis ¶
func InitParamGenesis(ctx sdk.Context, k Keeper, state ParamGenesisState)
func NewAnteHandler ¶
func NewAnteHandler(k Keeper) sdk.AnteHandler
NewAnteHandler returns an AnteHandler that checks whether msg type is activate or not
Types ¶
type BuildStoreKey ¶
type CoinConfig ¶
type GenesisState ¶
type GenesisState struct {
ActivatedTypes []string `json:"activated-types"`
}
GenesisState defines initial activated msg types
type Getter ¶
type Getter struct {
// contains filtered or unexported fields
}
Getter exposes methods related with only getting params
func (Getter) GetBoolWithDefault ¶
GetBoolWithDefault is helper function for bool params with default value
func (Getter) GetInt16WithDefault ¶
GetInt16WithDefault is helper function for int16 params with default value
func (Getter) GetInt32WithDefault ¶
GetInt32WithDefault is helper function for int32 params with default value
func (Getter) GetInt64WithDefault ¶
GetInt64WithDefault is helper function for int64 params with default value
func (Getter) GetIntWithDefault ¶
GetIntWithDefault is helper function for sdk.Int params with default value
func (Getter) GetRatWithDefault ¶
GetRatWithDefault is helper function for sdk.Rat params with default value
func (Getter) GetStringWithDefault ¶
GetStringWithDefault is helper function for string params with default value
func (Getter) GetUint16WithDefault ¶
GetUint16WithDefault is helper function for uint16 params with default value
func (Getter) GetUint32WithDefault ¶
GetUint32WithDefault is helper function for uint32 params with default value
func (Getter) GetUint64WithDefault ¶
GetUint64WithDefault is helper function for uint64 params with default value
type GetterProxy ¶
type GetterProxy struct { BuildStoreKey // contains filtered or unexported fields }
func (GetterProxy) Get ¶
func (proxy GetterProxy) Get(ctx sdk.Context, key string, res interface{}) (err error)
func (GetterProxy) GetBoolWithDefault ¶
GetBoolWithDefault is helper function for bool params with default value
func (GetterProxy) GetInt16WithDefault ¶
GetInt16WithDefault is helper function for int16 params with default value
func (GetterProxy) GetInt32WithDefault ¶
GetInt32WithDefault is helper function for int32 params with default value
func (GetterProxy) GetInt64WithDefault ¶
GetInt64WithDefault is helper function for int64 params with default value
func (GetterProxy) GetIntWithDefault ¶
GetIntWithDefault is helper function for sdk.Int params with default value
func (GetterProxy) GetRatWithDefault ¶
GetRatWithDefault is helper function for sdk.Rat params with default value
func (GetterProxy) GetRaw ¶
func (proxy GetterProxy) GetRaw(ctx sdk.Context, key string) []byte
GetRaw exposes getRaw
func (GetterProxy) GetStringWithDefault ¶
GetStringWithDefault is helper function for string params with default value
func (GetterProxy) GetUint16WithDefault ¶
GetUint16WithDefault is helper function for uint16 params with default value
func (GetterProxy) GetUint32WithDefault ¶
GetUint32WithDefault is helper function for uint32 params with default value
func (GetterProxy) GetUint64WithDefault ¶
GetUint64WithDefault is helper function for uint64 params with default value
func (GetterProxy) GetUintWithDefault ¶
func (proxy GetterProxy) GetUintWithDefault(ctx sdk.Context, key string, def sdk.Uint) (res sdk.Uint)
GetUintWithDefault is helper function for sdk.Uint params with default value
func (GetterProxy) GovGetter ¶
func (proxy GetterProxy) GovGetter() GetterProxy
Getter returns readonly struct,get from Gov
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper manages global parameter store
func InitKeeper ¶
InitKeeper constructs a new Keeper with initial parameters
func (Keeper) Getter ¶
func (k Keeper) Getter() GetterProxy
Getter returns readonly struct,default get from Global
func (Keeper) Setter ¶
func (k Keeper) Setter() SetterProxy
Getter returns readonly struct,add Prefix "global"
type ParamGenesisState ¶
type ParamGenesisState struct {
Coins []CoinConfig `json:"coins"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() (state ParamGenesisState)
type Setter ¶
type Setter struct {
Getter
}
Setter exposes all methods including Set
type SetterProxy ¶
type SetterProxy struct { GetterProxy // contains filtered or unexported fields }
func (SetterProxy) GovSetter ¶
func (proxy SetterProxy) GovSetter() SetterProxy
Getter returns readonly struct,add Prefix "gov"
func (SetterProxy) Set ¶
func (proxy SetterProxy) Set(ctx sdk.Context, key string, param interface{}) error
Set exposes set
func (SetterProxy) SetBool ¶
func (proxy SetterProxy) SetBool(ctx sdk.Context, key string, param bool)
SetBool is helper function for bool params
func (SetterProxy) SetInt16 ¶
func (proxy SetterProxy) SetInt16(ctx sdk.Context, key string, param int16)
SetInt16 is helper function for int16 params
func (SetterProxy) SetInt32 ¶
func (proxy SetterProxy) SetInt32(ctx sdk.Context, key string, param int32)
SetInt32 is helper function for int32 params
func (SetterProxy) SetInt64 ¶
func (proxy SetterProxy) SetInt64(ctx sdk.Context, key string, param int64)
SetInt64 is helper function for int64 params
func (SetterProxy) SetRaw ¶
func (proxy SetterProxy) SetRaw(ctx sdk.Context, key string, param []byte)
SetRaw exposes setRaw
func (SetterProxy) SetString ¶
func (proxy SetterProxy) SetString(ctx sdk.Context, key string, param string)
SetString is helper function for string params
func (SetterProxy) SetUint16 ¶
func (proxy SetterProxy) SetUint16(ctx sdk.Context, key string, param uint16)
SetUint16 is helper function for uint16 params