shield

package
v1.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ModuleName   = types.ModuleName
	StoreKey     = types.StoreKey
	RouterKey    = types.RouterKey
	QuerierRoute = types.QuerierRoute
)

Variables

View Source
var (
	// functions aliases
	RegisterInvariants          = keeper.RegisterInvariants
	NewKeeper                   = keeper.NewKeeper
	NewQuerier                  = keeper.NewQuerier
	ModuleCdc                   = types.ModuleCdc
	ProposalHandler             = client.ProposalHandler
	GetGenesisStateFromAppState = types.GetGenesisStateFromAppState
	ValidateGenesis             = types.ValidateGenesis
	GetPurchase                 = keeper.GetPurchase

	DefaultParamSpace       = types.DefaultParamspace
	ProposalTypeShieldClaim = types.ProposalTypeShieldClaim

	// variable aliases
	ErrPurchaseNotFound = types.ErrPurchaseNotFound
	PurchaseQueueKey    = types.PurchaseQueueKey
	WithdrawQueueKey    = types.WithdrawQueueKey
	BlockServiceFeesKey = types.BlockServiceFeesKey
)

Functions

func BeginBlock

func BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, k Keeper)

BeginBlock executes logics to begin a block.

func EndBlocker

func EndBlocker(ctx sdk.Context, k Keeper)

EndBlocker processes premium payment at every block.

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorUpdate

InitGenesis initialize store values with genesis states.

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler creates an sdk.Handler for all the shield type messages.

func NewShieldClaimProposalHandler

func NewShieldClaimProposalHandler(k Keeper) govtypes.Handler

Types

type AppModule

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

AppModule implements an application module for the shield module.

func NewAppModule

func NewAppModule(keeper Keeper, ak types.AccountKeeper, stk types.StakingKeeper, sk types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object.

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, rbb abci.RequestBeginBlock)

BeginBlock returns the begin blocker for the shield module.

func (AppModule) EndBlock

func (am AppModule) EndBlock(ctx sdk.Context, rbb abci.RequestEndBlock) []abci.ValidatorUpdate

EndBlock returns the end blocker for the shield module.

func (AppModule) ExportGenesis

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

ExportGenesis returns the exported genesis state as raw bytes for the shield module.

func (AppModule) InitGenesis

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

InitGenesis performs genesis initialization for the slashing module.

func (AppModule) Name

func (am AppModule) Name() string

Name returns the shield module's name.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the shield module.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns the shield module sdk.Querier.

func (AppModule) ProposalContents

func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent

ProposalContents returns functions that generate gov proposals for the module.

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

QuerierRoute returns the shield module's querier route name.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers the shield module invariants.

func (AppModule) Route

func (am AppModule) Route() string

Route returns the message routing key for the shield module.

func (AppModule) WeightedOperations

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

TODO: Simulation functions WeightedOperations returns shield operations for use in simulations.

type AppModuleBasic

type AppModuleBasic struct {
	common.AppModuleBasic
}

AppModuleBasic specifies the app module basics object.

func NewAppModuleBasic

func NewAppModuleBasic() AppModuleBasic

NewAppModuleBasic creates a new AppModuleBasic object in shield module.

func (AppModuleBasic) GenerateGenesisState

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

GenerateGenesisState creates a randomized GenState of this module.

func (AppModuleBasic) RandomizedParams

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

RandomizedParams returns functions that generate params for the module.

func (AppModuleBasic) RegisterStoreDecoder

func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for this module.

func (AppModuleBasic) ValidateGenesis

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

ValidateGenesis validates the module genesis.

type ClaimProposal

type ClaimProposal = types.ShieldClaimProposal

type ClaimProposalParams

type ClaimProposalParams = types.ClaimProposalParams

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis.

type Keeper

type Keeper = keeper.Keeper

type Provider

type Provider = types.Provider

type Purchase

type Purchase = types.Purchase

type PurchaseList

type PurchaseList = types.PurchaseList

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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