Documentation ¶
Index ¶
- func NewQuerier(k Keeper) types.QueryServer
- 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) GetSudoContracts(ctx sdk.Context) (contracts []string, err error)
- func (k Keeper) RemoveContracts(goCtx context.Context, msg *sudotypes.MsgEditSudoers) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
- type MsgServer
- type Querier
- type Sudoers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶ added in v0.21.7
func NewQuerier(k Keeper) types.QueryServer
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) GetSudoContracts ¶
func (Keeper) RemoveContracts ¶
func (k Keeper) RemoveContracts( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
type MsgServer ¶ added in v0.21.7
type MsgServer struct {
// contains filtered or unexported fields
}
func NewMsgServer ¶ added in v0.21.7
func (MsgServer) ChangeRoot ¶ added in v0.21.7
func (m MsgServer) ChangeRoot(ctx context.Context, msg *sudotypes.MsgChangeRoot) (*sudotypes.MsgChangeRootResponse, error)
func (MsgServer) EditSudoers ¶ added in v0.21.7
func (m MsgServer) EditSudoers( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (*sudotypes.MsgEditSudoersResponse, error)
EditSudoers adds or removes sudo contracts from state.
type Querier ¶ added in v0.21.7
type Querier struct {
// contains filtered or unexported fields
}
func (Querier) QuerySudoers ¶ added in v0.21.7
func (q Querier) QuerySudoers( goCtx context.Context, req *types.QuerySudoersRequest, ) (resp *types.QuerySudoersResponse, err error)
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.