Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) crs.MsgServer
- func NewQueryServerImpl(k Keeper) crs.QueryServer
- type Keeper
- func (k Keeper) CreateDecision(ctx context.Context, decision crs.Decision) error
- func (k Keeper) EndBlocker(ctx context.Context) error
- func (k *Keeper) ExportGenesis(ctx context.Context) (*crs.GenesisState, error)
- func (k Keeper) GetAuthority() string
- func (k *Keeper) InitGenesis(ctx context.Context, data *crs.GenesisState) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the module MsgServer interface.
func NewQueryServerImpl ¶
func NewQueryServerImpl(k Keeper) crs.QueryServer
NewQueryServerImpl returns an implementation of the module QueryServer.
Types ¶
type Keeper ¶
type Keeper struct { // state management Schema collections.Schema Params collections.Item[crs.Params] DecisionID collections.Sequence Decisions collections.Map[uint64, crs.Decision] // key: ID Commits collections.Map[collections.Pair[uint64, []byte], crs.Commit] // key: (decision ID, voter) Reveals collections.Map[collections.Pair[uint64, []byte], crs.Reveal] // key: (decision ID, voter) // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, addressCodec address.Codec, storeService storetypes.KVStoreService, bankKeeper expectedkeepers.BankKeeper, authority string) Keeper
NewKeeper creates a new Keeper instance
func (Keeper) CreateDecision ¶
func (Keeper) EndBlocker ¶
EndBlocker goest through all expired decisions and refunds the participants if needed. It will also delete commits, as we don't need them anymore.
func (*Keeper) ExportGenesis ¶
ExportGenesis exports the module state to a genesis state.
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (*Keeper) InitGenesis ¶
InitGenesis initializes the module state from a genesis state.
Click to show internal directories.
Click to hide internal directories.