keeper

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLegacyMsgServerImpl

func NewLegacyMsgServerImpl(govAcct string, v1Server v1.MsgServer) v1beta1.MsgServer

NewLegacyMsgServerImpl returns an implementation of the v1beta1 legacy MsgServer interface. It wraps around the current MsgServer

func NewMsgServerImpl

func NewMsgServerImpl(m v1.MsgServer, k Keeper) *msgServer

NewMsgServerImpl returns an implementation of the gov MsgServer interface for the provided Keeper.

Types

type Keeper

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

func (Keeper) ActivateVotingPeriod

func (keeper Keeper) ActivateVotingPeriod(ctx sdk.Context, proposal govv1.Proposal)

func (Keeper) AddDeposit

func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins) (bool, error)

AddDeposit adds or updates a deposit of a specific depositor on a specific proposal Activates voting period when appropriate

func (Keeper) AssertFXMetadata

func (keeper Keeper) AssertFXMetadata(pm fxgovtypes.FXMetadata) error

AssertFXMetadata returns an error if given metadata invalid

func (Keeper) Config

func (keeper Keeper) Config() types.Config

func (Keeper) EGFParams

func (Keeper) EGFProposalMinDeposit

func (keeper Keeper) EGFProposalMinDeposit(ctx sdk.Context, msgType string, claimCoin sdk.Coins) sdk.Coins

func (Keeper) EndBlocker

func (keeper Keeper) EndBlocker(ctx sdk.Context)

EndBlocker called every block, process inflation, update validator set.

func (Keeper) GetEGFParams

func (keeper Keeper) GetEGFParams(ctx sdk.Context) (params types.EGFParams)

GetEGFParams gets the gov module's parameters.

func (Keeper) GetMaxDepositPeriod

func (keeper Keeper) GetMaxDepositPeriod(ctx sdk.Context, msgType string) *time.Duration

func (Keeper) GetMinDeposit

func (keeper Keeper) GetMinDeposit(ctx sdk.Context, msgType string) []sdk.Coin

func (Keeper) GetMinInitialDeposit

func (keeper Keeper) GetMinInitialDeposit(ctx sdk.Context, msgType string) sdk.Coin

func (Keeper) GetParams

func (keeper Keeper) GetParams(ctx sdk.Context, msgType string) (params types.Params)

GetParams gets the gov module's parameters.

func (Keeper) GetQuorum

func (keeper Keeper) GetQuorum(ctx sdk.Context, msgType string) string

func (Keeper) GetThreshold

func (keeper Keeper) GetThreshold(ctx sdk.Context, msgType string) string

func (Keeper) GetVetoThreshold

func (keeper Keeper) GetVetoThreshold(ctx sdk.Context, msgType string) string

func (Keeper) GetVotingPeriod

func (keeper Keeper) GetVotingPeriod(ctx sdk.Context, msgType string) *time.Duration

func (Keeper) InitFxGovParams

func (keeper Keeper) InitFxGovParams(ctx sdk.Context) error

func (Keeper) NeedMinDeposit

func (keeper Keeper) NeedMinDeposit(ctx sdk.Context, proposal govv1.Proposal) sdk.Coins

func (Keeper) Params

func (Keeper) SetAllParams

func (keeper Keeper) SetAllParams(ctx sdk.Context, params []*types.Params) error

SetAllParams sets batch the gov module's parameters.

func (Keeper) SetEGFParams

func (keeper Keeper) SetEGFParams(ctx sdk.Context, params *types.EGFParams) error

SetEGFParams sets the gov module's parameters.

func (Keeper) SetParams

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

SetParams sets the gov module's parameters.

func (Keeper) SubmitProposal

func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, fxMetadata string) (v1.Proposal, error)

SubmitProposal creates a new proposal given an array of messages

func (Keeper) Tally

func (keeper Keeper) Tally(ctx sdk.Context, proposal govv1.Proposal) (passes bool, burnDeposits bool, tallyResults govv1.TallyResult)

Tally iterates over the votes and updates the tally of a proposal based on the voting power of the voters

type LegacyMsgServer

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

func (LegacyMsgServer) Deposit

func (LegacyMsgServer) SubmitProposal

func (LegacyMsgServer) Vote

func (LegacyMsgServer) VoteWeighted

type Migrator

type Migrator struct {
	govkeeper.Migrator
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(cdc codec.Codec, keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate2to3

func (m Migrator) Migrate2to3(ctx sdk.Context) error

Migrate2to3 migrates from version 2 to 3.

Jump to

Keyboard shortcuts

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