Documentation
¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQueryServerImpl(keeper Keeper) types.QueryServer
- type ActionApprovedVotesEnv
- type ActionKeeper
- func (k ActionKeeper) ActionsByAddress() collections.Map[collections.Pair[sdk.AccAddress, uint64], uint64]
- func (k ActionKeeper) Coll() repo.SeqCollection[types.Action]
- func (k ActionKeeper) ExpiredActions(ctx context.Context, blockTime time.Time, ...) ([]types.Action, error)
- func (k ActionKeeper) Get(ctx context.Context, id uint64) (types.Action, error)
- func (k ActionKeeper) GetLatestPruneHeight(ctx context.Context) (int64, error)
- func (k ActionKeeper) Import(ctx sdk.Context, actions []types.Action) error
- func (k ActionKeeper) New(ctx context.Context, action *types.Action) (uint64, error)
- func (k ActionKeeper) Set(ctx context.Context, action types.Action) error
- type ActionRejectedVotesEnv
- type Keeper
- func (k Keeper) ActionById(goCtx context.Context, req *types.QueryActionByIdRequest) (*types.QueryActionByIdResponse, error)
- func (k Keeper) Actions(goCtx context.Context, req *types.QueryActionsRequest) (*types.QueryActionsResponse, error)
- func (k Keeper) ActionsByAddress(goCtx context.Context, req *types.QueryActionsByAddressRequest) (*types.QueryActionsByAddressResponse, error)
- func (k Keeper) AddAction(ctx context.Context, creator string, msg sdk.Msg, timeoutHeight uint64, ...) (*types.Action, error)
- func (k Keeper) EndBlocker(ctx context.Context) error
- func (k *Keeper) ExportState(ctx sdk.Context, genState *types.GenesisState) error
- func (k Keeper) GetActionCreator(ctx context.Context) string
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetModuleAddress() string
- func (k Keeper) GetParams(ctx context.Context) (params types.Params)
- func (k Keeper) GetTemplate(ctx context.Context, id uint64) (types.Template, error)
- func (k *Keeper) ImportState(ctx sdk.Context, genState types.GenesisState) error
- func (k Keeper) IsValidTemplate(ctx context.Context, id uint64) error
- func (k Keeper) Logger() log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k Keeper) SimulateTemplate(goCtx context.Context, req *types.QuerySimulateTemplateRequest) (*types.QuerySimulateTemplateResponse, error)
- func (k Keeper) TemplateById(goCtx context.Context, req *types.QueryTemplateByIdRequest) (*types.QueryTemplateByIdResponse, error)
- func (k Keeper) Templates(goCtx context.Context, req *types.QueryTemplatesRequest) (*types.QueryTemplatesResponse, error)
- func (k Keeper) TemplatesRegistry() *types.TemplatesRegistry
- func (k Keeper) TryExecuteVotedAction(ctx context.Context, act *types.Action) error
- func (k Keeper) TryRejectVotedAction(ctx context.Context, act *types.Action) error
Constants ¶
This section is empty.
Variables ¶
var ( ActionPrefix = collections.NewPrefix(0) TemplatePrefix = collections.NewPrefix(1) ActionByAddressPrefix = collections.NewPrefix(2) PreviousPruneBlockHeightPrefix = collections.NewPrefix(3) )
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewQueryServerImpl ¶ added in v0.5.2
func NewQueryServerImpl(keeper Keeper) types.QueryServer
NewQueryServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type ActionApprovedVotesEnv ¶ added in v0.5.0
type ActionApprovedVotesEnv []*types.ActionVote
ActionApprovedVotesEnv is an environment that resolves action positive votes addresses to true.
type ActionKeeper ¶
type ActionKeeper struct {
// contains filtered or unexported fields
}
func (ActionKeeper) ActionsByAddress ¶
func (k ActionKeeper) ActionsByAddress() collections.Map[collections.Pair[sdk.AccAddress, uint64], uint64]
func (ActionKeeper) Coll ¶
func (k ActionKeeper) Coll() repo.SeqCollection[types.Action]
func (ActionKeeper) ExpiredActions ¶ added in v0.5.0
func (ActionKeeper) GetLatestPruneHeight ¶ added in v0.5.0
func (k ActionKeeper) GetLatestPruneHeight(ctx context.Context) (int64, error)
type ActionRejectedVotesEnv ¶ added in v0.5.0
type ActionRejectedVotesEnv []*types.ActionVote
ActionRejectedVotesEnv is an environment that resolves action negative votes addresses to true.
type Keeper ¶
type Keeper struct { ActionKeeper ActionKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeService store.KVStoreService, logger log.Logger, router baseapp.MessageRouter, authority string, actModuleAddress string, shieldExpanderFunc func() ast.Expander, templatesRegistry *types.TemplatesRegistry, ) Keeper
func (Keeper) ActionById ¶
func (k Keeper) ActionById(goCtx context.Context, req *types.QueryActionByIdRequest) (*types.QueryActionByIdResponse, error)
func (Keeper) Actions ¶
func (k Keeper) Actions(goCtx context.Context, req *types.QueryActionsRequest) (*types.QueryActionsResponse, error)
func (Keeper) ActionsByAddress ¶
func (k Keeper) ActionsByAddress(goCtx context.Context, req *types.QueryActionsByAddressRequest) (*types.QueryActionsByAddressResponse, error)
func (Keeper) AddAction ¶
func (k Keeper) AddAction(ctx context.Context, creator string, msg sdk.Msg, timeoutHeight uint64, expectedApproveExpression *ast.Expression, expectedRejectExpression *ast.Expression) (*types.Action, error)
AddAction creates a new action. The action is created with the provided creator as the first approver. This function also tries to execute the action immediately if it's ready.
func (*Keeper) ExportState ¶ added in v0.4.1
func (Keeper) GetActionCreator ¶
GetActionCreator returns the original address of the creator of the Action. This function is intended to be used in the context of MsgHandlers being executed as part of an Action.
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) GetModuleAddress ¶
func (Keeper) GetTemplate ¶ added in v0.5.0
func (*Keeper) ImportState ¶ added in v0.4.1
func (Keeper) IsValidTemplate ¶ added in v0.5.0
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SimulateTemplate ¶ added in v0.5.0
func (k Keeper) SimulateTemplate(goCtx context.Context, req *types.QuerySimulateTemplateRequest) (*types.QuerySimulateTemplateResponse, error)
func (Keeper) TemplateById ¶ added in v0.5.0
func (k Keeper) TemplateById(goCtx context.Context, req *types.QueryTemplateByIdRequest) (*types.QueryTemplateByIdResponse, error)
nolint:stylecheck,st1003 revive:disable-next-line var-naming
func (Keeper) Templates ¶ added in v0.5.0
func (k Keeper) Templates(goCtx context.Context, req *types.QueryTemplatesRequest) (*types.QueryTemplatesResponse, error)
func (Keeper) TemplatesRegistry ¶ added in v0.5.0
func (k Keeper) TemplatesRegistry() *types.TemplatesRegistry
func (Keeper) TryExecuteVotedAction ¶ added in v0.5.0
TryExecuteVotedAction checks if the action's expression is satisfied and stores the result in the database.
Source Files
¶
- abci.go
- actions.go
- actions_keeper.go
- genesis.go
- keeper.go
- msg_server.go
- msg_server_check_action.go
- msg_server_new_action.go
- msg_server_new_rule.go
- msg_server_revoke_action.go
- msg_server_update_params.go
- msg_server_update_rule.go
- msg_server_vote_for_action.go
- params.go
- query.go
- query_action_by_id.go
- query_actions.go
- query_actions_by_address.go
- query_params.go
- query_rule_by_id.go
- query_rules.go
- query_simulate_rule.go
- rules.go