params

package
v0.24.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivatedParamKey

func ActivatedParamKey(ty string) string

ActivatedParamKey - paramstore key for msg type activation

func InitGenesis

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

InitGenesis stores activated type to param store

func NewAnteHandler

func NewAnteHandler(k Keeper) sdk.AnteHandler

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

Types

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) Get

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

Get exposes get

func (Getter) GetBool

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

GetBool is helper function for bool params

func (Getter) GetBoolWithDefault

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

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

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

GetInt16 is helper function for int16 params

func (Getter) GetInt16WithDefault

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

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

GetInt32 is helper function for int32 params

func (Getter) GetInt32WithDefault

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

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

GetInt64 is helper function for int64 params

func (Getter) GetInt64WithDefault

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

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

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

GetRat is helper function for rat params

func (Getter) GetRatWithDefault

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

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

GetRaw exposes getRaw

func (Getter) GetString

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

GetString is helper function for string params

func (Getter) GetStringWithDefault

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

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

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

GetUint16 is helper function for uint16 params

func (Getter) GetUint16WithDefault

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

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

GetUint32 is helper function for uint32 params

func (Getter) GetUint32WithDefault

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

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

GetUint64 is helper function for uint64 params

func (Getter) GetUint64WithDefault

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

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

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

func (k Keeper) Getter() Getter

Getter returns readonly struct

func (Keeper) Setter

func (k Keeper) Setter() Setter

Setter returns read/write struct

type Setter

type Setter struct {
	Getter
}

Setter exposes all methods including Set

func (Setter) Set

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

Set exposes set

func (Setter) SetBool

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

SetBool is helper function for bool params

func (Setter) SetInt

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

SetInt is helper function for sdk.Int params

func (Setter) SetInt16

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

SetInt16 is helper function for int16 params

func (Setter) SetInt32

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

SetInt32 is helper function for int32 params

func (Setter) SetInt64

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

SetInt64 is helper function for int64 params

func (Setter) SetRat

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

SetRat is helper function for rat params

func (Setter) SetRaw

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

SetRaw exposes setRaw

func (Setter) SetString

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

SetString is helper function for string params

func (Setter) SetUint

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

SetUint is helper function for sdk.Uint params

func (Setter) SetUint16

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

SetUint16 is helper function for uint16 params

func (Setter) SetUint32

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

SetUint32 is helper function for uint32 params

func (Setter) SetUint64

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