keeper

package
v2.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: BSD-2-Clause Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	Sudoers                collections.Item[sudo.Sudoers]
	ZeroGasActors          collections.Item[sudo.ZeroGasActors]
	WasmBlockHooksContract collections.Item[string]
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey types.StoreKey,
) Keeper

func (Keeper) ChangeRoot added in v2.8.0

func (k Keeper) ChangeRoot(
	goCtx context.Context,
	msg *sudo.MsgChangeRoot,
) (*sudo.MsgChangeRootResponse, error)

func (Keeper) CheckPermissions

func (k Keeper) CheckPermissions(actor sdk.AccAddress, ctx sdk.Context, role string) error

CheckPermissions allows root or a member of role. An empty role is root-only.

func (Keeper) EditSudoers added in v2.8.0

func (k Keeper) EditSudoers(
	goCtx context.Context, msg *sudo.MsgEditSudoers,
) (*sudo.MsgEditSudoersResponse, error)

EditSudoers configures the Wasm block-hook registry.

func (Keeper) EditWasmBlockHooksContract added in v2.17.0

func (k Keeper) EditWasmBlockHooksContract(
	goCtx context.Context, msg *sudo.MsgEditSudoers,
) (msgResp *sudo.MsgEditSudoersResponse, err error)

EditWasmBlockHooksContract updates the optional Wasm contract address used by x/wasm to discover ABCI block hook dispatch plans.

func (Keeper) EditZeroGasActors added in v2.8.0

func (k Keeper) EditZeroGasActors(
	goCtx context.Context,
	msg *sudo.MsgEditZeroGasActors,
) (*sudo.MsgEditZeroGasActorsResponse, error)

func (Keeper) ExportGenesis added in v2.8.0

func (k Keeper) ExportGenesis(ctx sdk.Context) *sudo.GenesisState

ExportGenesis returns the module's exported genesis state. This fn assumes Keeper.InitGenesis has already been called.

func (Keeper) GetRootAddr

func (k Keeper) GetRootAddr(ctx sdk.Context) (sdk.AccAddress, error)

Returns the root address of the sudo module.

func (Keeper) GetWasmBlockHooksContract added in v2.17.0

func (k Keeper) GetWasmBlockHooksContract(ctx sdk.Context) (sdk.AccAddress, bool)

GetWasmBlockHooksContract returns the configured Wasm block-hooks contract address and whether the address is present.

func (Keeper) GetZeroGasActors added in v2.8.0

func (k Keeper) GetZeroGasActors(ctx sdk.Context) sudo.ZeroGasActors

func (Keeper) GetZeroGasEvmContracts added in v2.11.0

func (k Keeper) GetZeroGasEvmContracts(ctx sdk.Context) map[gethcommon.Address]struct{}

GetZeroGasEvmContracts loads the ZeroGasActors state and returns a set (map) of EVM contract addresses that can be parsed from the zero-gas list, for O(1) lookup. Used by the EVM module via the evm.SudoKeeper interface without depending on x/sudo-specific types.

func (Keeper) InitGenesis added in v2.8.0

func (k Keeper) InitGenesis(ctx sdk.Context, genState sudo.GenesisState)

InitGenesis initializes the module's state from a provided genesis state JSON.

func (Keeper) Migrate1To2

func (k Keeper) Migrate1To2(ctx sdk.Context) error

Migrate1To2 preserves the broad legacy authority as the two scoped roles. Decode tag 2 before the current Sudoers decoder discards the retired field.

func (Keeper) QuerySudoers added in v2.8.0

func (k Keeper) QuerySudoers(
	goCtx context.Context,
	req *sudo.QuerySudoersRequest,
) (resp *sudo.QuerySudoersResponse, err error)

func (Keeper) QueryZeroGasActors added in v2.8.0

func (k Keeper) QueryZeroGasActors(
	goCtx context.Context,
	_ *sudo.QueryZeroGasActorsRequest,
) (resp *sudo.QueryZeroGasActorsResponse, err error)

func (Keeper) UpdateRoleMembers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL