params

package
v0.24.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 4 Imported by: 1,825

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivatedParamKey added in v0.24.0

func ActivatedParamKey(ty string) string

ActivatedParamKey - paramstore key for msg type activation

func InitGenesis added in v0.24.0

func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)

InitGenesis stores activated type to param store

func NewAnteHandler added in v0.24.0

func NewAnteHandler(k Keeper) sdk.AnteHandler

NewAnteHandler returns an AnteHandler that checks whether msg type is activate or not

Types

type GenesisState added in v0.24.0

type GenesisState struct {
	ActivatedTypes []string `json:"activated-types"`
}

GenesisState defines initial activated msg types

type Getter added in v0.24.0

type Getter struct {
	// contains filtered or unexported fields
}

Getter exposes methods related with only getting params

func (Getter) Get added in v0.24.0

func (k Getter) Get(ctx sdk.Context, key string, ptr interface{}) error

Get exposes get

func (Getter) GetBool added in v0.24.0

func (k Getter) GetBool(ctx sdk.Context, key string) (res bool, err error)

GetBool is helper function for bool params

func (Getter) GetBoolWithDefault added in v0.24.0

func (k Getter) GetBoolWithDefault(ctx sdk.Context, key string, def bool) (res bool)

GetBoolWithDefault is helper function for bool params with default value

func (Getter) GetInt added in v0.24.0

func (k Getter) GetInt(ctx sdk.Context, key string) (res sdk.Int, err error)

GetInt is helper function for sdk.Int params

func (Getter) GetInt16 added in v0.24.0

func (k Getter) GetInt16(ctx sdk.Context, key string) (res int16, err error)

GetInt16 is helper function for int16 params

func (Getter) GetInt16WithDefault added in v0.24.0

func (k Getter) GetInt16WithDefault(ctx sdk.Context, key string, def int16) (res int16)

GetInt16WithDefault is helper function for int16 params with default value

func (Getter) GetInt32 added in v0.24.0

func (k Getter) GetInt32(ctx sdk.Context, key string) (res int32, err error)

GetInt32 is helper function for int32 params

func (Getter) GetInt32WithDefault added in v0.24.0

func (k Getter) GetInt32WithDefault(ctx sdk.Context, key string, def int32) (res int32)

GetInt32WithDefault is helper function for int32 params with default value

func (Getter) GetInt64 added in v0.24.0

func (k Getter) GetInt64(ctx sdk.Context, key string) (res int64, err error)

GetInt64 is helper function for int64 params

func (Getter) GetInt64WithDefault added in v0.24.0

func (k Getter) GetInt64WithDefault(ctx sdk.Context, key string, def int64) (res int64)

GetInt64WithDefault is helper function for int64 params with default value

func (Getter) GetIntWithDefault added in v0.24.0

func (k Getter) GetIntWithDefault(ctx sdk.Context, key string, def sdk.Int) (res sdk.Int)

GetIntWithDefault is helper function for sdk.Int params with default value

func (Getter) GetRat added in v0.24.0

func (k Getter) GetRat(ctx sdk.Context, key string) (res sdk.Rat, err error)

GetRat is helper function for rat params

func (Getter) GetRatWithDefault added in v0.24.0

func (k Getter) GetRatWithDefault(ctx sdk.Context, key string, def sdk.Rat) (res sdk.Rat)

GetRatWithDefault is helper function for sdk.Rat params with default value

func (Getter) GetRaw added in v0.24.0

func (k Getter) GetRaw(ctx sdk.Context, key string) []byte

GetRaw exposes getRaw

func (Getter) GetString added in v0.24.0

func (k Getter) GetString(ctx sdk.Context, key string) (res string, err error)

GetString is helper function for string params

func (Getter) GetStringWithDefault added in v0.24.0

func (k Getter) GetStringWithDefault(ctx sdk.Context, key string, def string) (res string)

GetStringWithDefault is helper function for string params with default value

func (Getter) GetUint added in v0.24.0

func (k Getter) GetUint(ctx sdk.Context, key string) (res sdk.Uint, err error)

GetUint is helper function for sdk.Uint params

func (Getter) GetUint16 added in v0.24.0

func (k Getter) GetUint16(ctx sdk.Context, key string) (res uint16, err error)

GetUint16 is helper function for uint16 params

func (Getter) GetUint16WithDefault added in v0.24.0

func (k Getter) GetUint16WithDefault(ctx sdk.Context, key string, def uint16) (res uint16)

GetUint16WithDefault is helper function for uint16 params with default value

func (Getter) GetUint32 added in v0.24.0

func (k Getter) GetUint32(ctx sdk.Context, key string) (res uint32, err error)

GetUint32 is helper function for uint32 params

func (Getter) GetUint32WithDefault added in v0.24.0

func (k Getter) GetUint32WithDefault(ctx sdk.Context, key string, def uint32) (res uint32)

GetUint32WithDefault is helper function for uint32 params with default value

func (Getter) GetUint64 added in v0.24.0

func (k Getter) GetUint64(ctx sdk.Context, key string) (res uint64, err error)

GetUint64 is helper function for uint64 params

func (Getter) GetUint64WithDefault added in v0.24.0

func (k Getter) GetUint64WithDefault(ctx sdk.Context, key string, def uint64) (res uint64)

GetUint64WithDefault is helper function for uint64 params with default value

func (Getter) GetUintWithDefault added in v0.24.0

func (k Getter) GetUintWithDefault(ctx sdk.Context, key string, def sdk.Uint) (res sdk.Uint)

GetUintWithDefault is helper function for sdk.Uint params with default value

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper manages global parameter store

func InitKeeper added in v0.24.0

func InitKeeper(ctx sdk.Context, cdc *wire.Codec, key sdk.StoreKey, params ...interface{}) Keeper

InitKeeper constructs a new Keeper with initial parameters

func NewKeeper

func NewKeeper(cdc *wire.Codec, key sdk.StoreKey) Keeper

NewKeeper constructs a new Keeper

func (Keeper) Getter added in v0.24.0

func (k Keeper) Getter() Getter

Getter returns readonly struct

func (Keeper) Setter added in v0.24.0

func (k Keeper) Setter() Setter

Setter returns read/write struct

type Setter added in v0.24.0

type Setter struct {
	Getter
}

Setter exposes all methods including Set

func (Setter) Set added in v0.24.0

func (k Setter) Set(ctx sdk.Context, key string, param interface{}) error

Set exposes set

func (Setter) SetBool added in v0.24.0

func (k Setter) SetBool(ctx sdk.Context, key string, param bool)

SetBool is helper function for bool params

func (Setter) SetInt added in v0.24.0

func (k Setter) SetInt(ctx sdk.Context, key string, param sdk.Int)

SetInt is helper function for sdk.Int params

func (Setter) SetInt16 added in v0.24.0

func (k Setter) SetInt16(ctx sdk.Context, key string, param int16)

SetInt16 is helper function for int16 params

func (Setter) SetInt32 added in v0.24.0

func (k Setter) SetInt32(ctx sdk.Context, key string, param int32)

SetInt32 is helper function for int32 params

func (Setter) SetInt64 added in v0.24.0

func (k Setter) SetInt64(ctx sdk.Context, key string, param int64)

SetInt64 is helper function for int64 params

func (Setter) SetRat added in v0.24.0

func (k Setter) SetRat(ctx sdk.Context, key string, param sdk.Rat)

SetRat is helper function for rat params

func (Setter) SetRaw added in v0.24.0

func (k Setter) SetRaw(ctx sdk.Context, key string, param []byte)

SetRaw exposes setRaw

func (Setter) SetString added in v0.24.0

func (k Setter) SetString(ctx sdk.Context, key string, param string)

SetString is helper function for string params

func (Setter) SetUint added in v0.24.0

func (k Setter) SetUint(ctx sdk.Context, key string, param sdk.Uint)

SetUint is helper function for sdk.Uint params

func (Setter) SetUint16 added in v0.24.0

func (k Setter) SetUint16(ctx sdk.Context, key string, param uint16)

SetUint16 is helper function for uint16 params

func (Setter) SetUint32 added in v0.24.0

func (k Setter) SetUint32(ctx sdk.Context, key string, param uint32)

SetUint32 is helper function for uint32 params

func (Setter) SetUint64 added in v0.24.0

func (k Setter) SetUint64(ctx sdk.Context, key string, param uint64)

SetUint64 is helper function for uint64 params

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL