Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- 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) Get(ctx sdk.Context, id uint64) (types.Action, error)
- func (k ActionKeeper) New(ctx sdk.Context, action *types.Action) (uint64, error)
- func (k ActionKeeper) Set(ctx sdk.Context, action types.Action) error
- type ApproversEnv
- 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 sdk.Context, creator string, msg sdk.Msg, intent types.Intent, btl uint64) (*types.Action, error)
- func (k Keeper) CheckActionReady(ctx sdk.Context, act types.Action) (bool, error)
- func (k Keeper) ExecuteAction(ctx sdk.Context, act *types.Action) error
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetIntent(ctx sdk.Context, id uint64) (types.Intent, error)
- func (k Keeper) GetParams(ctx context.Context) (params types.Params)
- func (k Keeper) IntentById(goCtx context.Context, req *types.QueryIntentByIdRequest) (*types.QueryIntentByIdResponse, error)
- func (k Keeper) Intents(goCtx context.Context, req *types.QueryIntentsRequest) (*types.QueryIntentsResponse, error)
- func (k Keeper) Logger() log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RegisterActionHandler(actionType string, handlerFn types.ActionHandler)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
var ( ActionPrefix = collections.NewPrefix(0) IntentPrefix = collections.NewPrefix(1) ActionByAddressPrefix = collections.NewPrefix(2) )
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type ActionKeeper ¶ added in v0.1.1
type ActionKeeper struct {
// contains filtered or unexported fields
}
func (ActionKeeper) ActionsByAddress ¶ added in v0.1.1
func (k ActionKeeper) ActionsByAddress() collections.Map[collections.Pair[sdk.AccAddress, uint64], uint64]
func (ActionKeeper) Coll ¶ added in v0.1.1
func (k ActionKeeper) Coll() repo.SeqCollection[types.Action]
type ApproversEnv ¶ added in v0.1.1
ApproversEnv is an environment that resolves approvers' addresses to true.
type Keeper ¶
type Keeper struct { ActionKeeper ActionKeeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, logger log.Logger, authority string, shieldExpanderFunc func() ast.Expander, ) 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 sdk.Context, creator string, msg sdk.Msg, intent types.Intent, btl uint64) (*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) CheckActionReady ¶
CheckActionReady checks if the intent attached to the action is satisfied. If the intent is satisfied, the action is marked as completed and true is returned, the actual execution of the action is left for the caller.
func (Keeper) ExecuteAction ¶
ExecuteAction executes the action and stores the result in the database. The action will be modified in place, setting the Result field. The updated action will also be persisted in the database.
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) IntentById ¶
func (k Keeper) IntentById(goCtx context.Context, req *types.QueryIntentByIdRequest) (*types.QueryIntentByIdResponse, error)
nolint:stylecheck,st1003 revive:disable-next-line var-naming
func (Keeper) Intents ¶
func (k Keeper) Intents(goCtx context.Context, req *types.QueryIntentsRequest) (*types.QueryIntentsResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RegisterActionHandler ¶
func (k Keeper) RegisterActionHandler(actionType string, handlerFn types.ActionHandler)
RegisterActionHandler registers a handler for a specific action type.
type Migrator ¶ added in v0.1.1
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶ added in v0.1.1
NewMigrator returns a new Migrator.
Source Files ¶
- actions.go
- actions_keeper.go
- intents.go
- keeper.go
- migrations.go
- msg_server.go
- msg_server_approve_action.go
- msg_server_new_intent.go
- msg_server_revoke_action.go
- msg_server_update_intent.go
- msg_update_params.go
- params.go
- query.go
- query_action_by_id.go
- query_actions.go
- query_actions_by_address.go
- query_intent_by_id.go
- query_intents.go
- query_params.go