Documentation ¶
Index ¶
- func SudoersToPb(sudo Sudoers) sudotypes.Sudoers
- func SudoersValueEncoder(cdc codec.BinaryCodec) collections.ValueEncoder[sudotypes.Sudoers]
- type Keeper
- func (k Keeper) AddContracts(goCtx context.Context, msg *sudotypes.MsgEditSudoers) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
- func (k Keeper) CheckPermissions(contract sdk.AccAddress, ctx sdk.Context) error
- func (k Keeper) EditSudoers(goCtx context.Context, msg *sudotypes.MsgEditSudoers) (*sudotypes.MsgEditSudoersResponse, error)
- func (k Keeper) GetSudoContracts(ctx sdk.Context) (contracts []string, err error)
- func (k Keeper) QuerySudoers(goCtx context.Context, req *types.QuerySudoersRequest) (resp *types.QuerySudoersResponse, err error)
- func (k Keeper) RemoveContracts(goCtx context.Context, msg *sudotypes.MsgEditSudoers) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
- func (k Keeper) SenderHasPermission(sender string, root string) error
- func (k Keeper) SetSudoContracts(contracts []string, ctx sdk.Context)
- type Sudoers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SudoersToPb ¶
func SudoersValueEncoder ¶
func SudoersValueEncoder(cdc codec.BinaryCodec) collections.ValueEncoder[sudotypes.Sudoers]
Types ¶
type Keeper ¶
type Keeper struct {
Sudoers collections.Item[sudotypes.Sudoers]
}
func (Keeper) AddContracts ¶
func (k Keeper) AddContracts( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
AddContracts executes a MsgEditSudoers message with action type "add_contracts". This adds contract addresses to the sudoer set.
func (Keeper) CheckPermissions ¶
CheckPermissions Checks if a contract is contained within the set of sudo contracts defined in the x/sudo module. These smart contracts are able to execute certain permissioned functions.
func (Keeper) EditSudoers ¶
func (k Keeper) EditSudoers( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (*sudotypes.MsgEditSudoersResponse, error)
EditSudoers adds or removes sudo contracts from state.
func (Keeper) GetSudoContracts ¶
func (Keeper) QuerySudoers ¶
func (k Keeper) QuerySudoers( goCtx context.Context, req *types.QuerySudoersRequest, ) (resp *types.QuerySudoersResponse, err error)
func (Keeper) RemoveContracts ¶
func (k Keeper) RemoveContracts( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
func (Keeper) SenderHasPermission ¶
type Sudoers ¶
func SudoersFromPb ¶
func (*Sudoers) AddContracts ¶
AddContracts adds contract addresses to the sudoer set.
func (*Sudoers) RemoveContracts ¶
Click to show internal directories.
Click to hide internal directories.