params

package
v0.19.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName        = sdkparams.ModuleName
	DefaultCodespace  = types.DefaultCodespace
	DefaultParamspace = sdkparams.ModuleName
	StoreKey          = sdkparams.StoreKey
	TStoreKey         = sdkparams.TStoreKey
	RouterKey         = sdkparams.RouterKey
)

const

Variables

View Source
var (
	// nolint
	NewKeyTable     = sdkparams.NewKeyTable
	NewParamChange  = sdkparams.NewParamChange
	DefaultParams   = types.DefaultParams
	NewParamSetPair = sdkparams.NewParamSetPair
)
View Source
var ModuleCdc *codec.Codec

ModuleCdc is the codec of module

Functions

func NewParamChangeProposalHandler

func NewParamChangeProposalHandler(k *Keeper) govtypes.Handler

NewParamChangeProposalHandler returns the rollback function of the param proposal handler

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier returns all query handlers

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers all necessary param module types with a given codec.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis checks if parameters are within valid ranges

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule is the struct of this app module

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)

func (AppModule) EndBlock

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis exports the module genesis state

func (AppModule) GenerateGenesisState

func (AppModule) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the staking module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis initializes the module genesis state

func (AppModule) NewHandler

func (AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

func (AppModule) ProposalContents

ProposalContents doesn't return any content functions for governance proposals.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

func (AppModule) RandomizedParams

func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams creates randomized staking param changes for the simulator.

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

nolint

func (AppModule) RegisterStoreDecoder

func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for staking module's types

func (AppModule) Route

func (AppModule) Route() string

Route returns the module route name

func (AppModule) WeightedOperations

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the staking module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic is the struct of app module basics object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns the default genesis state in json raw message

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(_ *codec.Codec) *cobra.Command

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the module name

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec registers module codec

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(_ context.CLIContext, _ *mux.Router)

nolint

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis gives a quick validity check for module genesis

type BankKeeper

type BankKeeper interface {
	GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper shows the expected action of bank keeper

type GenesisState

type GenesisState struct {
	Params types.Params `json:"params" yaml:"params"`
}

GenesisState contains all params state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns the default genesis state of this module

type GovKeeper

type GovKeeper interface {
	InsertWaitingProposalQueue(ctx sdk.Context, blockHeight, proposalID uint64)
	RemoveFromWaitingProposalQueue(ctx sdk.Context, blockHeight, proposalID uint64)
}

GovKeeper shows the expected action of gov keeper

type Keeper

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

Keeper is the struct of params keeper

func NewKeeper

func NewKeeper(cdc *codec.Codec, key *sdk.KVStoreKey, tkey *sdk.TransientStoreKey) (
	k Keeper)

NewKeeper creates a new instance of params keeper

func (Keeper) AfterDepositPeriodPassed

func (keeper Keeper) AfterDepositPeriodPassed(ctx sdk.Context, proposal govtypes.Proposal)

func (Keeper) AfterSubmitProposalHandler

func (keeper Keeper) AfterSubmitProposalHandler(ctx sdk.Context, proposal govtypes.Proposal)

nolint

func (Keeper) CheckMsgSubmitProposal

func (keeper Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg govtypes.MsgSubmitProposal) sdk.Error

CheckMsgSubmitProposal implements ProposalHandler interface

func (Keeper) GetMaxDepositPeriod

func (keeper Keeper) GetMaxDepositPeriod(ctx sdk.Context, content govtypes.Content) (maxDepositPeriod time.Duration)

GetMaxDepositPeriod implements ProposalHandler interface

func (Keeper) GetMinDeposit

func (keeper Keeper) GetMinDeposit(ctx sdk.Context, content govtypes.Content) (minDeposit sdk.SysCoins)

GetMinDeposit implements ProposalHandler interface

func (Keeper) GetParams

func (keeper Keeper) GetParams(ctx sdk.Context) types.Params

GetParams gets the params info from the store

func (Keeper) GetVotingPeriod

func (keeper Keeper) GetVotingPeriod(ctx sdk.Context, content govtypes.Content) (votingPeriod time.Duration)

GetVotingPeriod implements ProposalHandler interface

func (Keeper) RejectedHandler

func (keeper Keeper) RejectedHandler(ctx sdk.Context, content govtypes.Content)

func (*Keeper) SetBankKeeper

func (keeper *Keeper) SetBankKeeper(ck BankKeeper)

SetBankKeeper hooks the bank keeper into params keeper

func (*Keeper) SetGovKeeper

func (keeper *Keeper) SetGovKeeper(gk GovKeeper)

SetGovKeeper hooks the gov keeper into params keeper

func (*Keeper) SetParams

func (keeper *Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the params into the store

func (*Keeper) SetStakingKeeper

func (keeper *Keeper) SetStakingKeeper(sk StakingKeeper)

SetStakingKeeper hooks the staking keeper into params keeper

func (Keeper) VoteHandler

func (keeper Keeper) VoteHandler(ctx sdk.Context, proposal govtypes.Proposal, vote govtypes.Vote) (string, sdk.Error)

type KeyTable

type KeyTable = sdkparams.KeyTable

KeyTable is the type alias of the one in cmsdk

type ParamChange

type ParamChange = sdkparams.ParamChange

ParamChange is the type alias of the one in cmsdk

type ParamSet

type ParamSet = sdkparams.ParamSet

ParamSet is the type alias of the one in cmsdk

type ParamSetPair

type ParamSetPair = sdkparams.ParamSetPair

ParamSetPairs is the type alias of the one in cmsdk

type ParamSetPairs

type ParamSetPairs = sdkparams.ParamSetPairs

ParamSetPairs is the type alias of the one in cmsdk

type ParameterChangeProposal

type ParameterChangeProposal = types.ParameterChangeProposal

ParameterChangeProposal is alias of ParameterChangeProposal in types

type StakingKeeper

type StakingKeeper interface {
	IsValidator(ctx sdk.Context, addr sdk.AccAddress) bool
}

StakingKeeper shows the expected action of staking keeper

type Subspace

type Subspace = sdkparams.Subspace

Subspace is the type alias of the one in cmsdk

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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