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) GetRootAddr(ctx sdk.Context) (sdk.AccAddress, 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 ¶
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) GetRootAddr ¶
Returns the root address of the sudo module.
func (Keeper) RemoveContracts ¶
func (k Keeper) RemoveContracts( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (msgResp *sudotypes.MsgEditSudoersResponse, err error)
type MsgServer ¶
type MsgServer struct {
// contains filtered or unexported fields
}
func NewMsgServer ¶
func (MsgServer) ChangeRoot ¶
func (m MsgServer) ChangeRoot(ctx context.Context, msg *sudotypes.MsgChangeRoot) (*sudotypes.MsgChangeRootResponse, error)
func (MsgServer) EditSudoers ¶
func (m MsgServer) EditSudoers( goCtx context.Context, msg *sudotypes.MsgEditSudoers, ) (*sudotypes.MsgEditSudoersResponse, error)
EditSudoers adds or removes sudo contracts from state.
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func (Querier) QuerySudoers ¶
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.