Documentation
¶
Index ¶
- type Keeper
- func (k Keeper) AddContracts(goCtx context.Context, msg *sudo.MsgEditSudoers) (msgResp *sudo.MsgEditSudoersResponse, err error)
- func (k Keeper) ChangeRoot(goCtx context.Context, msg *sudo.MsgChangeRoot) (*sudo.MsgChangeRootResponse, error)
- func (k Keeper) CheckPermissions(contract sdk.AccAddress, ctx sdk.Context) error
- func (k Keeper) EditSudoers(goCtx context.Context, msg *sudo.MsgEditSudoers) (*sudo.MsgEditSudoersResponse, error)
- func (k Keeper) EditZeroGasActors(goCtx context.Context, msg *sudo.MsgEditZeroGasActors) (*sudo.MsgEditZeroGasActorsResponse, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *sudo.GenesisState
- func (k Keeper) GetRootAddr(ctx sdk.Context) (sdk.AccAddress, error)
- func (k Keeper) GetZeroGasActors(ctx sdk.Context) sudo.ZeroGasActors
- func (k Keeper) GetZeroGasEvmContracts(ctx sdk.Context) map[gethcommon.Address]struct{}
- func (k Keeper) InitGenesis(ctx sdk.Context, genState sudo.GenesisState)
- func (k Keeper) QuerySudoers(goCtx context.Context, req *sudo.QuerySudoersRequest) (resp *sudo.QuerySudoersResponse, err error)
- func (k Keeper) QueryZeroGasActors(goCtx context.Context, _ *sudo.QueryZeroGasActorsRequest) (resp *sudo.QueryZeroGasActorsResponse, err error)
- func (k Keeper) RemoveContracts(goCtx context.Context, msg *sudo.MsgEditSudoers) (msgResp *sudo.MsgEditSudoersResponse, err error)
- type Sudoers
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]
}
func (Keeper) AddContracts ¶
func (k Keeper) AddContracts( goCtx context.Context, msg *sudo.MsgEditSudoers, ) (msgResp *sudo.MsgEditSudoersResponse, err error)
AddContracts executes a MsgEditSudoers message with action type "add_contracts". This adds contract addresses to the sudoer set.
func (Keeper) ChangeRoot ¶ added in v2.8.0
func (k Keeper) ChangeRoot( goCtx context.Context, msg *sudo.MsgChangeRoot, ) (*sudo.MsgChangeRootResponse, error)
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 ¶ added in v2.8.0
func (k Keeper) EditSudoers( goCtx context.Context, msg *sudo.MsgEditSudoers, ) (*sudo.MsgEditSudoersResponse, error)
EditSudoers adds or removes sudo contracts from state.
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 ¶
Returns the root address of the sudo module.
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) 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) RemoveContracts ¶
func (k Keeper) RemoveContracts( goCtx context.Context, msg *sudo.MsgEditSudoers, ) (msgResp *sudo.MsgEditSudoersResponse, err error)
type Sudoers ¶
func SudoersFromPb ¶
func (*Sudoers) AddContracts ¶
AddContracts adds contract addresses to the sudoer set.